From 75d902ef016c2966129ceb1f53165e46e11d1063 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 8 Nov 1994 22:40:52 +0000 Subject: . --- tests/join/Makefile | 8 ++++---- tests/join/TODO | 2 ++ tests/join/build-script | 5 ++++- tests/join/test.data.pl | 9 ++++++++- 4 files changed, 18 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/join/Makefile b/tests/join/Makefile index 391f1a04f..683b343a8 100644 --- a/tests/join/Makefile +++ b/tests/join/Makefile @@ -1,8 +1,8 @@ .PHONY: all -all: tr-tests - ./tr-tests +all: join-tests + ./join-tests -tr-tests: main build-script test.data.pl +join-tests: main build-script test.data.pl ./main test.data.pl > $@.n mv $@.n $@ chmod 755 $@ @@ -16,4 +16,4 @@ clean: distclean .PHONY: realclean realclean: clean - rm -f tr-tests t*.in t*.exp + rm -f join-tests t*.in t*.exp diff --git a/tests/join/TODO b/tests/join/TODO index e69de29bb..265ea4799 100644 --- a/tests/join/TODO +++ b/tests/join/TODO @@ -0,0 +1,2 @@ +rename tr-tests +make sure all test_names are distinct! diff --git a/tests/join/build-script b/tests/join/build-script index 1e0e67765..01fbd2e02 100755 --- a/tests/join/build-script +++ b/tests/join/build-script @@ -1,13 +1,16 @@ #!/p/bin/perl5.000 -w -$join = '/usr/bin/join'; $join = 'join'; +$join = '/usr/bin/join'; +$join = './join'; $test = 0; $| = 1; print ":\nerrors=0\n"; $expected = ''; $flags = ''; +$f1 = ''; +$f2 = ''; while (<>) { diff --git a/tests/join/test.data.pl b/tests/join/test.data.pl index 50413bd0e..27815af7b 100755 --- a/tests/join/test.data.pl +++ b/tests/join/test.data.pl @@ -1,4 +1,11 @@ +# TODO: make sure all test_names are unique!!!! # test name # flags file-1 file-2 expected output expected return code # -("1", '-a1 -a2', "a 1\n", "b\n", "a 1\nb\n", 0); +('1a', '-a1', "a 1\n", "b\n", "a 1\n", 0); +('1b', '-a2', "a 1\n", "b\n", "b\n", 0); # Got "\n" +('1c', '-a1 -a2', "a 1\n", "b\n", "a 1\nb\n", 0); # Got "a 1\n\n" + +('2a', '-a1 -e .', "a\nb\nc\n", "a x y\nb\nc\n", "a x y\nb\nc\n", 0); +('2b', '-a1 -e . -o 2.1,2.2,2.3', "a\nb\nc\n", "a x y\nb\nc\n", "a x y\nb . .\nc . .\n", 0); +('2c', '-a1 -e . -o 2.1,2.2,2.3', "a\nb\nc\nd\n", "a x y\nb\nc\n", "a x y\nb . .\nc . .\nd\n", 0); -- cgit v1.2.3-54-g00ecf