mirror of
https://github.com/troglobit/libite.git
synced 2026-11-28 20:48:27 +00:00
Add autotest for chomp
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
2ea2357b62
commit
ebe2ad4a4c
4 files changed
+8
-3
No files matched your search
@@ -65,6 +65,7 @@ incdir ?= $(prefix)/include
|
|||||||
include rules.mk
|
include rules.mk
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
$(MAKE) -f chomp.mk
|
||||||
$(MAKE) -f rsync.mk
|
$(MAKE) -f rsync.mk
|
||||||
|
|
||||||
$(OBJS): Makefile
|
$(OBJS): Makefile
|
||||||
|
|||||||
@@ -50,13 +50,13 @@ char *chomp(char *str)
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
int i; char t[][16] = { "hej\ndej", "Slime\n\n\\n", "Tripple\n\n\n", "" };
|
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
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* compile-command: "gcc -DUNITTEST -o chompy chomp.c && ./chompy"
|
* compile-command: "make V=1 -f chomp.mk"
|
||||||
* version-control: t
|
* version-control: t
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* compile-command: "make -f rsync.mk"
|
* compile-command: "make V=1 -f rsync.mk"
|
||||||
* version-control: t
|
* version-control: t
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
|
|||||||
Reference in new issue
Block a user