#include <stdio.h>
#include <string.h>
-#include "../src/str.h"
+#include <pstr.h>
static int test_strrep(const char *str,
const char *old,
static int tests_strrep()
{
int failures;
-
+
failures = 0;
failures += test_strrep(NULL, NULL, NULL, NULL);
failures += test_strrep("DastringE", "astring", "", "DE");
failures += test_strrep("Dastring", "astring", "", "D");
failures += test_strrep("astringE", "astring", "", "E");
-
+
failures += test_strrep("astring", "old", "new", "astring");
failures += test_strrep("aoldstring", "old", "new", "anewstring");
failures += test_strrep("astring", "astring", "thenewstring",
failures += tests_strrep();
- if (failures)
+ if (failures)
exit(EXIT_FAILURE);
else
exit(EXIT_SUCCESS);