diff options
author | Jim Meyering <jim@meyering.net> | 1998-10-03 16:47:44 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-10-03 16:47:44 +0000 |
commit | 62ff4ae63c049456a81061deb95a4b28edde25f3 (patch) | |
tree | e4fa9df40b52f2110573cb0955866ed8be0bb88c /tests | |
parent | 9ef5ce05813b5b700f883224d20e5de9019bedcc (diff) | |
download | coreutils-62ff4ae63c049456a81061deb95a4b28edde25f3.tar.xz |
Make `VERBOSE' be a little more verbose.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Fetish.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/Fetish.pm b/tests/Fetish.pm index 038c50b9f..35a62e808 100644 --- a/tests/Fetish.pm +++ b/tests/Fetish.pm @@ -12,7 +12,7 @@ use FileHandle; use File::Compare qw(compare); @ISA = qw(Exporter); -($VERSION = '$Revision: 1.3 $ ') =~ tr/[0-9].//cd; +($VERSION = '$Revision: 1.4 $ ') =~ tr/[0-9].//cd; @EXPORT = qw (run_tests); my @Types = qw (IN OUT ERR EXIT PRE POST); @@ -63,9 +63,9 @@ sub _shell_quote ($) return "'$string'"; } -sub _create_file ($$$$) +sub _create_file ($$$$$) { - my ($program_name, $test_name, $file_name, $data) = @_; + my ($program_name, $test_name, $file_name, $data, $verbose) = @_; my $file; if (defined $file_name) { @@ -77,6 +77,8 @@ sub _create_file ($$$$) ++$Global_count; } + warn "creating file `$file' with contents `$data'\n" if $verbose; + # The test spec gave a string. # Write it to a temp file and return tempfile name. my $fh = new FileHandle "> $file"; @@ -194,7 +196,7 @@ sub run_tests ($$$$$) my $is_junk_file = (! defined $file_name || ($type eq 'IN' && defined $contents)); my $file = _create_file ($program_name, $test_name, - $file_name, $contents); + $file_name, $contents, $verbose); if ($type eq 'IN') { push @args, _shell_quote $file; @@ -227,7 +229,7 @@ sub run_tests ($$$$$) if (!exists $expect->{$eo}) { $expect->{$eo} = _create_file ($program_name, $test_name, - undef, ''); + undef, '', $verbose); push @junk_files, $expect->{$eo}; } } |