diff options
author | Jim Meyering <jim@meyering.net> | 1998-08-15 23:43:37 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-08-15 23:43:37 +0000 |
commit | b07a5a108e8d3cc308cc70fb58fbaaf617fa5adb (patch) | |
tree | caca4d2bd136205ee95cd6ecd4f1b2f243cca1d3 /tests/ls-2 | |
parent | 2db8ef7c55c311a74048c1aaa7e6cebcecc1732f (diff) | |
download | coreutils-b07a5a108e8d3cc308cc70fb58fbaaf617fa5adb.tar.xz |
*** empty log message ***
Diffstat (limited to 'tests/ls-2')
-rw-r--r-- | tests/ls-2/Fetish.pm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/ls-2/Fetish.pm b/tests/ls-2/Fetish.pm index ee0207d1e..d20640924 100644 --- a/tests/ls-2/Fetish.pm +++ b/tests/ls-2/Fetish.pm @@ -1,4 +1,4 @@ -package T; +package Fetish; require 5.003; use strict; @@ -8,7 +8,7 @@ use FileHandle; use File::Compare qw(compare); @ISA = qw(Exporter); -($VERSION = '$Revision: 1.1 $ ') =~ tr/[0-9].//cd; +($VERSION = '$Revision: 1.2 $ ') =~ tr/[0-9].//cd; @EXPORT = qw (run_tests); my @Types = qw (IN OUT ERR EXIT); @@ -45,6 +45,13 @@ my %Zero_one_type = map {$_ => 1} qw (OUT ERR EXIT); my $Global_count = 1; +sub _shell_quote ($) +{ + my ($string) = @_; + $string =~ s/\'/\'\\\'\'/g; + return "'$string'"; +} + sub _create_file ($$$$$) { my ($program_name, $test_name, $type, $file_name, $data) = @_; @@ -169,7 +176,7 @@ sub run_tests ($$$$$) $file_name, $contents); if ($type eq 'IN') { - push @args, $file + push @args, _shell_quote $file; } else { |