summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-11-08 22:40:52 +0000
committerJim Meyering <jim@meyering.net>1994-11-08 22:40:52 +0000
commit75d902ef016c2966129ceb1f53165e46e11d1063 (patch)
tree20a5d392e320c222cde2b70fc24d94fb266bbd85
parentda098ddd8a46ff7655710f8e49c9f97685af2f39 (diff)
downloadcoreutils-75d902ef016c2966129ceb1f53165e46e11d1063.tar.xz
.
-rw-r--r--tests/join/Makefile8
-rw-r--r--tests/join/TODO2
-rwxr-xr-xtests/join/build-script5
-rwxr-xr-xtests/join/test.data.pl9
4 files changed, 18 insertions, 6 deletions
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);