summaryrefslogtreecommitdiff
path: root/tests/tr
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-09-30 02:43:22 +0000
committerJim Meyering <jim@meyering.net>1996-09-30 02:43:22 +0000
commit814dc354076d7672f9e6744b4502144ea747bea4 (patch)
treef1b6dba72df3bbc9b0ca8954db067fd3be977576 /tests/tr
parent99fe90503522450ae192460c7a6de2b349f6ef66 (diff)
downloadcoreutils-814dc354076d7672f9e6744b4502144ea747bea4.tar.xz
Die if close fails.
Diffstat (limited to 'tests/tr')
-rwxr-xr-xtests/tr/build-script.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/tr/build-script.pl b/tests/tr/build-script.pl
index 5017126d3..2c7656f37 100755
--- a/tests/tr/build-script.pl
+++ b/tests/tr/build-script.pl
@@ -42,10 +42,11 @@ foreach $test_vector (@Test::t)
open (IN, ">$in") || die "$0: $in: $!\n";
print IN $input;
- close (IN);
- open (EXP, ">$exp_name") || die "$0: $in: $!\n";
+ close (IN) || die "$0: $in: $!\n";
+ open (EXP, ">$exp_name") || die "$0: $exp_name: $!\n";
print EXP $expected;
- close (EXP);
+ close (EXP) || die "$0: $exp_name: $!\n";
+
my $err_output = "t$test_name.err";
my $arg2 = ($s2 ? " '$s2'" : '');
my $cmd = "\$xx $flags \'$s1\'$arg2 < \$srcdir/$in > $out 2> $err_output";