Index: trunk/psLib/test/sys/tap_psStringSubstitute.c
===================================================================
--- trunk/psLib/test/sys/tap_psStringSubstitute.c	(revision 8841)
+++ trunk/psLib/test/sys/tap_psStringSubstitute.c	(revision 10446)
@@ -18,5 +18,5 @@
     {
         psString input = psStringCopy(ORIGINAL);
-        input = psStringSubstitute(input, ",", NULL);
+        psStringSubstitute(&input, ",", NULL);
         ok(input && strcmp(input, ORIGINAL) == 0, "output = %s", input);
         psFree(input);
@@ -28,5 +28,5 @@
     {
         psString input = psStringCopy(ORIGINAL);
-        input = psStringSubstitute(input, "XXX", "");
+        psStringSubstitute(&input, "XXX", "");
         ok(input && strcmp(input, ORIGINAL) == 0, "output = %s", input);
         psFree(input);
@@ -38,7 +38,7 @@
     {
         psString input = psStringCopy(ORIGINAL);
-        psString output = psStringSubstitute(input, NULL, ",");
-        ok(output && strcmp(output, CORRECTED) == 0, "output = %s", output);
-        psFree(output);
+        psStringSubstitute(&input, NULL, ",");
+        ok(input && strcmp(input, CORRECTED) == 0, "output = %s", input);
+        psFree(input);
         mem();
     }
@@ -47,7 +47,7 @@
     {
         psString input = psStringCopy(ORIGINAL);
-        psString output = psStringSubstitute(input, "", ",");
-        ok(output && strcmp(output, CORRECTED) == 0, "output = %s", output);
-        psFree(output);
+        psStringSubstitute(&input, "", ",");
+        ok(input && strcmp(input, CORRECTED) == 0, "output = %s", input);
+        psFree(input);
         mem();
     }
@@ -55,6 +55,6 @@
     // Return NULL for NULL input
     {
-        psString output = psStringSubstitute(NULL, "XXX", ",");
-        ok(!output, "output = %s", output);
+        int status = psStringSubstitute(NULL, "XXX", ",");
+        ok(status == 0, "status = %d", status);
         mem();
     }
@@ -63,7 +63,7 @@
     {
         psString input = psStringCopy("");
-        psString output = psStringSubstitute(input, "XXX", ",");
-        ok(output && strcmp(output, input) == 0, "output = %s", output);
-        psFree(output);
+        psStringSubstitute(&input, "XXX", ",");
+        ok(input && strcmp(input, "") == 0, "output = %s", input);
+        psFree(input);
         mem();
     }
@@ -72,7 +72,7 @@
     {
         psString input = psStringCopy(ORIGINAL);
-        psString output = psStringSubstitute(input, "!", ",");
-        ok(output && strcmp(output, "This is! a! test case! to check.") == 0, "output = %s", output);
-        psFree(output);
+        psStringSubstitute(&input, "!", ",");
+        ok(input && strcmp(input, "This is! a! test case! to check.") == 0, "output = %s", input);
+        psFree(input);
         mem();
     }
@@ -81,9 +81,9 @@
     {
         psString input = psStringCopy(ORIGINAL);
-        psString output = psStringSubstitute(input, "; This string is too long to fit in input(35 chars)", ".");
-        ok(output && strcmp(output, "This is, a, test case, to check; "
-                            "This string is too long to fit in input(35 chars)") == 0,
-           "output = %s", output);
-        psFree(output);
+        psStringSubstitute(&input, "; This string is too long to fit in input(35 chars)", ".");
+        ok(input && strcmp(input, "This is, a, test case, to check; "
+                           "This string is too long to fit in input(35 chars)") == 0,
+           "output = %s", input);
+        psFree(input);
         mem();
     }
