summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-11-07 12:55:05 +0000
committerJim Meyering <jim@meyering.net>1994-11-07 12:55:05 +0000
commitda098ddd8a46ff7655710f8e49c9f97685af2f39 (patch)
tree0bbb5c8ffc13bf72ba611c1279900b9e410191fa /tests
parentcb4c5aaf0a1884bcae21c7d31b70864e64bb55fa (diff)
downloadcoreutils-da098ddd8a46ff7655710f8e49c9f97685af2f39.tar.xz
.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/join/build-script24
-rwxr-xr-xtests/join/test.data.pl2
2 files changed, 13 insertions, 13 deletions
diff --git a/tests/join/build-script b/tests/join/build-script
index ab064d5cb..1e0e67765 100755
--- a/tests/join/build-script
+++ b/tests/join/build-script
@@ -1,16 +1,13 @@
#!/p/bin/perl5.000 -w
-$tr = '../tr +io 5';
-$tr = 'tr';
+$join = '/usr/bin/join';
+$join = 'join';
$test = 0;
$| = 1;
print ":\nerrors=0\n";
$expected = '';
-$s1 = '';
-$input = '';
$flags = '';
-$s1 = '';
while (<>)
{
@@ -18,26 +15,29 @@ while (<>)
$test++;
chop;
- $prog = '($test_name, $input,$flags,$s1,$s2,$expected,$e_ret_code) = ' . $_ . ';';
+ $prog = '($test_name, $flags,$f1,$f2,$expected,$e_ret_code) = ' . $_ . ';';
eval $prog;
- $in = "t$test_name.in";
+ $in1 = "t$test_name.1";
+ $in2 = "t$test_name.2";
$exp_name = 't' . $test_name . '.exp';
$out = "t$test_name.out";
- open(IN, ">$in") || die "Couldn't open $in for writing.\n";
- print IN $input;
+ 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);
- $arg2 = ($s2 ? "'$s2'" : '');
- $cmd = "$tr $flags \'$s1\' $arg2 < $in > $out";
+ $cmd = "$join $flags $in1 $in2 > $out";
print <<EOF ;
$cmd 2> /dev/null
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: join return code \$code differs from expected value $e_ret_code 1>&2
errors=`expr \$errors + 1`
else
cmp $out $exp_name
diff --git a/tests/join/test.data.pl b/tests/join/test.data.pl
index 35322ca11..50413bd0e 100755
--- a/tests/join/test.data.pl
+++ b/tests/join/test.data.pl
@@ -1,4 +1,4 @@
# test name
# flags file-1 file-2 expected output expected return code
#
-("1", '-a1 -a2', "a 1\n", "\n", "a 1\n", 0);
+("1", '-a1 -a2', "a 1\n", "b\n", "a 1\nb\n", 0);