From a887b29ffb8b138dba83b00aff4b5ab4d2288e19 Mon Sep 17 00:00:00 2001 From: Sven Michael Klose Date: Tue, 5 Mar 2024 07:04:59 +0100 Subject: [PATCH] Revert "Test strtok()." This reverts commit 3a7bd539568e25f33c64a88fd6e76a9e015c74f2. --- test/ref/strtok.c | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 test/ref/strtok.c diff --git a/test/ref/strtok.c b/test/ref/strtok.c deleted file mode 100644 index 15c3a289d..000000000 --- a/test/ref/strtok.c +++ /dev/null @@ -1,43 +0,0 @@ -// 2024-02-14 Sven Michael Klose - -#include -#include -#include - -void -error (void) -{ - printf ("strtok() test failed!\n"); - exit (-1); -} - -void -test (char * s) -{ - if (strcmp ("test", strtok (s, "/"))) - error (); - if (strcmp ("foo", strtok (NULL, "/"))) - error (); - if (strcmp ("bar", strtok (NULL, "/"))) - error (); - if (strtok (NULL, "/")) - error (); - if (strtok (NULL, "/")) - error (); -} - -int -main (void) -{ - char s1[] = "test/foo/bar"; - char s2[] = "/test/foo/bar"; - char s3[] = "//test/foo/bar"; - char s4[] = "//test/foo/bar//"; - - test (s1); - test (s2); - test (s3); - test (s4); - - return 0; -}