diff options
author | Jim Meyering <jim@meyering.net> | 1996-10-18 04:56:53 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-10-18 04:56:53 +0000 |
commit | cb84de4217687e3cefe3211ac1afcafe3d1a39ef (patch) | |
tree | 49120b2720e01f8a641d36ff60dd3bce6fadfaf4 /tests | |
parent | 7111d936699d97e1c4c7cc523b240bb732bd93ba (diff) | |
download | coreutils-cb84de4217687e3cefe3211ac1afcafe3d1a39ef.tar.xz |
.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/join/build-script | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/tests/join/build-script b/tests/join/build-script deleted file mode 100755 index c55cf3449..000000000 --- a/tests/join/build-script +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/perl -w - -$join = 'join'; -$join = '/usr/bin/join'; -$join = './join'; -$test = 0; -$| = 1; - -print ":\n$join --version\nerrors=0\n"; -$expected = ''; -$flags = ''; -$f1 = ''; -$f2 = ''; - -while (<>) - { - next if (/^\s*#/ || /^\s+$/); - - $test++; - chop; - $prog = '($test_name, $flags,$f1,$f2,$expected,$e_ret_code) = ' . $_ . ';'; - eval $prog; - if (defined ($seen{$test_name})) - { - die "$0: $.: duplicate test name \`$test_name'\n"; - } - $seen{$test_name} = 1; - $in1 = "t$test_name.1"; - $in2 = "t$test_name.2"; - $log = "t$test_name.log"; - $exp_name = 't' . $test_name . '.exp'; - $out = "t$test_name.out"; - - open(IN, ">$in1") || die "Couldn't open $in1 for writing.\n"; - print IN $f1; - close(IN); - open(IN, ">$in2") || die "Couldn't open $in2 for writing.\n"; - print IN $f2; - close(IN); - open(EXP, ">$exp_name") - || die "Couldn't open $exp_name for writing.\n"; - print EXP $expected; - close(EXP); - $cmd = "$join $flags $in1 $in2 > $out"; - print <<EOF ; -$cmd 2> $log -code=\$? -fail=yes -if test \$code != $e_ret_code ; then - err_msg="Test $test_name failed: join return code \$code differs from expected value $e_ret_code" -else - cmp $out $exp_name >> $log 2>&1 - case \$? in - 0) # equal files - if test "\$verbose" ; then - echo passed $test_name - fi - fail=no - ;; - 1) err_msg="Test $test_name failed: files $out and $exp_name differ" - ;; - 2) err_msg="Test $test_name may have failed. -echo The command \"cmp $out $exp_name\" failed." - ;; - esac -fi -if test \$fail = yes; then - errors=`expr \$errors + 1` - echo "Failing command: $cmd" >> $log - echo "\$err_msg" >> $log -fi -test -s $log || rm -f $log -EOF - } -print <<EOF2 ; -if test \$errors -gt 0 ; then - echo "Failed \$errors tests." 1>&2 -else - echo 'Passed all tests.' 1>&2 -fi -EOF2 |