diff options
author | Patrick Simianer <p@simianer.de> | 2014-06-15 03:50:43 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-06-15 03:50:43 +0200 |
commit | 6ed9a9699997a2853ec1c9e91747c251e5cfc97b (patch) | |
tree | 56c96f18442fb06aeeb45cadc56355353a63ee99 /ccc/stringutil_test.c | |
parent | 258e1b92ebbfdebefabc120969ab87c3d8b75c3d (diff) |
damn
Diffstat (limited to 'ccc/stringutil_test.c')
-rw-r--r-- | ccc/stringutil_test.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/ccc/stringutil_test.c b/ccc/stringutil_test.c deleted file mode 100644 index 798bccd..0000000 --- a/ccc/stringutil_test.c +++ /dev/null @@ -1,53 +0,0 @@ -#include "filelib.h" -#include "stringutil.h" - - -int -main(void) -{ - /* - * strend - * - */ - char* s= ""; - char* end = strend(s); - if (end) - printf("should not output: %s\n", end); - - s = "asdf.gz"; - end = strend(s); - if (end) - printf("expect 'z': %s\n", end); - - /* - * endswith - * - */ - if (endswith(s, ".gz")) - printf("%s ends with %s\n", s, ".gz"); - - if (endswith(".gz", ".gz")) - printf(".gz ends with .gz\n"); - - if(!endswith("gz", ".gz")) - printf("gz does not end with .gz\n"); - - /* - * filelib - * - */ - hFile* f = makef("-", "a"); - if (!f) - printf("Error creating file '%s'\n", "-"); - writeln("this goes to stdout", f); - closef(f); - - hFile* g = makef("gzfile.gz", "a"); - if (!g) - printf("Error creating file '%s'\n", "-"); - writeln("this should be compressed", g); - closef(g); - - return 0; -} - |