mirror of
https://github.com/troglobit/libite.git
synced 2026-10-02 13:52:51 +07:00
Add autotest for chomp
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -65,6 +65,7 @@ incdir ?= $(prefix)/include
|
||||
include rules.mk
|
||||
|
||||
test:
|
||||
$(MAKE) -f chomp.mk
|
||||
$(MAKE) -f rsync.mk
|
||||
|
||||
$(OBJS): Makefile
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user