diff options
author | Jim Meyering <jim@meyering.net> | 1996-12-15 20:35:32 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-12-15 20:35:32 +0000 |
commit | 3a2afe3311b6afe13e0fc36bbe46838debb41ef4 (patch) | |
tree | e4d66804377d7da040fbc162cebe2cd169ac174f /tests/join/mk-script.pl | |
parent | 20b960db1069f72e0ea864f18ccdcf4fb9b14ded (diff) | |
download | coreutils-3a2afe3311b6afe13e0fc36bbe46838debb41ef4.tar.xz |
apply spec_to_list to expected file, too.
Diffstat (limited to 'tests/join/mk-script.pl')
-rw-r--r-- | tests/join/mk-script.pl | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/join/mk-script.pl b/tests/join/mk-script.pl index f1a4fa40a..9ae9778e7 100644 --- a/tests/join/mk-script.pl +++ b/tests/join/mk-script.pl @@ -111,20 +111,11 @@ EOF my $test_vector; foreach $test_vector (@Test::t) { - my ($test_name, $flags, $in_spec, $expected, $e_ret_code) + my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code) = @{$test_vector}; my $in = spec_to_list ($in_spec, $test_name, 'in'); - my $exp_name = "t$test_name.exp"; - my $out = "t$test_name.out"; - - open (EXP, ">$exp_name") || die "$0: $exp_name: $!\n"; - print EXP $expected; - close (EXP) || die "$0: $exp_name: $!\n"; - - my $err_output = "t$test_name.err"; - my @srcdir_rel_in_file; my $f; foreach $f (@{ $in->{ALL_FILES} }) @@ -132,9 +123,14 @@ foreach $test_vector (@Test::t) push (@srcdir_rel_in_file, "\$srcdir/$f") } + my $Exp = spec_to_list ($exp_spec, $test_name, 'exp'); + assert (@{ $Exp->{ALL_FILES} } == 1); + my $exp_name = "\$srcdir/$Exp->{ALL_FILES}->[0]"; + my $out = "t$test_name.out"; + my $err_output = "t$test_name.err"; + my $cmd = "\$xx $flags " . join (' ', @srcdir_rel_in_file) . " > $out 2> $err_output"; - $exp_name = "\$srcdir/$exp_name"; print <<EOF ; $cmd code=\$? |