about summary refs log tree commit diff
path: root/string/tester.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/tester.c')
-rw-r--r--string/tester.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/string/tester.c b/string/tester.c
index 5b7b2f97f9..d74ab72852 100644
--- a/string/tester.c
+++ b/string/tester.c
@@ -695,13 +695,12 @@ test_strsep (void)
 
   {
     char text[] = "This,is,a,test";
-    char *list = text;
-    it = "strsep";
-    check (!strcmp ("This", strsep (&list, ",")), 1);
-    check (!strcmp ("is", strsep (&list, ",")), 2);
-    check (!strcmp ("a", strsep (&list, ",")), 3);
-    check (!strcmp ("test", strsep (&list, ",")), 4);
-    check (strsep (&list, ",") == NULL, 5);
+    char *list = strdupa (text);
+    equal (strsep (&list, ","), "This", 47);
+    equal (strsep (&list, ","), "is", 48);
+    equal (strsep (&list, ","), "a", 49);
+    equal (strsep (&list, ","), "test", 50);
+    check (strsep (&list, ",") == NULL, 51);
   }
 }