Add autotest for chomp

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-08-22 22:08:25 +02:00
1 parent 2ea2357b62
commit ebe2ad4a4c
4 files changed
+8 -3

No files matched your search

+2 -2
View File
@@ -50,13 +50,13 @@ char *chomp(char *str)
int main(void)
{
int i; char t[][16] = { "hej\ndej", "Slime\n\n\\n", "Tripple\n\n\n", "" };
for (i = 0; t[i][0]; i++) printf("'%s'\n", chomp(t[i])); return 0;
for (i = 0; t[i][0]; i++) printf("[%02d]: '%s'\n", i, chomp(t[i])); return 0;
}
#endif
/**
* Local Variables:
* compile-command: "gcc -DUNITTEST -o chompy chomp.c && ./chompy"
* compile-command: "make V=1 -f chomp.mk"
* version-control: t
* indent-tabs-mode: t
* c-file-style: "linux"