Index: trunk/psLib/test/sys/tap_psStringSubstitute.c
===================================================================
--- trunk/psLib/test/sys/tap_psStringSubstitute.c	(revision 7881)
+++ trunk/psLib/test/sys/tap_psStringSubstitute.c	(revision 8224)
@@ -5,8 +5,9 @@
 #define ORIGINAL "This is, a, test case, to check."
 #define CORRECTED "This is a test case to check."
+#define mem() ok(psMemCheckLeaks(0, NULL, stdout, false) == 0, "Memory Leaks")
 
 int main (void)
 {
-    plan_tests(8);
+    plan_tests(10);
 
     diag("psStringSubstitute() tests");
@@ -15,7 +16,9 @@
     {
         psString input = psStringCopy(ORIGINAL);
-        psString output = psStringSubstitute(input, ",", NULL);
-        ok(output && strcmp(output, ORIGINAL) == 0, "output = %s", output);
-        psFree(output);
+        input = psStringSubstitute(input, ",", NULL);
+        ok(input && strcmp(input, ORIGINAL) == 0, "output = %s", input);
+        psFree(input);
+        //        ok(psMemCheckLeaks(0, NULL, stdout, false) == 0, "Memory Leaks");
+        mem();
     }
 
@@ -23,7 +26,8 @@
     {
         psString input = psStringCopy(ORIGINAL);
-        psString output = psStringSubstitute(input, "XXX", "");
-        ok(output && strcmp(output, ORIGINAL) == 0, "output = %s", output);
-        psFree(output);
+        input = psStringSubstitute(input, "XXX", "");
+        ok(input && strcmp(input, ORIGINAL) == 0, "output = %s", input);
+        //        psFree(input);
+        ok(psMemCheckLeaks(0, NULL, stdout, false) == 0, "Memory Leaks");
     }
 
