diff options
author | Jim Meyering <jim@meyering.net> | 1995-11-30 20:26:33 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1995-11-30 20:26:33 +0000 |
commit | 5eeef11a3b136e235cf3b868e49c231b4f569cfb (patch) | |
tree | 92f08765f7f74cebc1f6038159b72881c6fc6a27 /tests/tr/build-script | |
parent | cfbca54a71283153bdfde431ab606bd91ae8b519 (diff) | |
download | coreutils-5eeef11a3b136e235cf3b868e49c231b4f569cfb.tar.xz |
standardizing...
Diffstat (limited to 'tests/tr/build-script')
-rwxr-xr-x | tests/tr/build-script | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/tr/build-script b/tests/tr/build-script index 4864c2b34..6e55d8b0b 100755 --- a/tests/tr/build-script +++ b/tests/tr/build-script @@ -1,13 +1,11 @@ #!/p/bin/perl -w -$tr = '../tr +io 5'; -$tr = 'tr'; -$tr = './tr'; +$xx = './tr'; $test = 0; $| = 1; -print "#! /bin/sh\ntr='$tr'\necho testing with tr=\$tr\nerrors=0\n"; -print "$tr --version 2> /dev/null\n"; +print "#! /bin/sh\nxx='$xx'\necho testing with $xx=\$xx\nerrors=0\n"; +print "$xx --version 2> /dev/null\n"; $expected = ''; $s1 = ''; $input = ''; @@ -22,6 +20,11 @@ while (<>) chop; $prog = '($test_name, $input,$flags,$s1,$s2,$expected,$e_ret_code) = ' . $_ . ';'; eval $prog; + if (defined ($seen{$test_name})) + { + die "$0: $.: duplicate test name \`$test_name'\n"; + } + $seen{$test_name} = 1; $in = "t$test_name.in"; $exp_name = 't' . $test_name . '.exp'; $out = "t$test_name.out"; @@ -35,12 +38,12 @@ while (<>) close(EXP); $arg2 = ($s2 ? " '$s2'" : ''); $err_output = "t$test_name.err"; - $cmd = "\$tr $flags \'$s1\'$arg2 < $in > $out 2> $err_output"; + $cmd = "\$xx $flags \'$s1\'$arg2 < $in > $out 2> $err_output"; print <<EOF ; $cmd code=\$? if test \$code != $e_ret_code ; then - echo Test $test_name failed: tr return code \$code differs from expected value $e_ret_code 1>&2 + echo Test $test_name failed: $xx return code \$code differs from expected value $e_ret_code 1>&2 errors=`expr \$errors + 1` else cmp $out $exp_name |