From 0c141f3c08aa3f5c0029e4f306e61365d33329dd Mon Sep 17 00:00:00 2001 From: Flavio Poletti Date: Mon, 12 Aug 2013 07:24:11 +0200 Subject: [PATCH] added test for listing --- t/01/Makefile | 8 ++++++-- t/01/script.list | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 t/01/script.list diff --git a/t/01/Makefile b/t/01/Makefile index e932ca3..50e89d7 100644 --- a/t/01/Makefile +++ b/t/01/Makefile @@ -17,9 +17,13 @@ extract: @cd prova/root && ls -R > ../root.list clean: - @rm -rf prova test.pl + @rm -rf prova list test.pl -check: compile extract +list: + ./test.pl -l | sed 's/.* //' | sort > list + +check: compile extract list diff here.list prova/here.list diff root.list prova/root.list + diff list script.list @echo -e "\nall tests successful" diff --git a/t/01/script.list b/t/01/script.list new file mode 100644 index 0000000..ed95197 --- /dev/null +++ b/t/01/script.list @@ -0,0 +1,24 @@ +./ +./ +hello.sh +here: +./.hidden +./inroot_1_1/ +./inroot_1_1/root_1_1.txt +./inroot_1_1/subroot_1_1/ +./inroot_1_1/subroot_1_1/whatever.txt +./inroot_1_2/ +./inroot_1_2/root_1_2.txt +./inroot_2/ +./inroot_2/root_2.txt +root: +./root_1.txt +./root_2.txt +rootdir_1/ +rootdir_1/hey.txt +rootdir_1/whatever/ +rootdir_1/whatever/hey.txt +rootdir_2/ +rootdir_2/ouch.txt +rootdir_2/yadda/ +rootdir_2/yadda/whatever.txt -- 2.11.4.GIT