From: Jim Meyering Date: Sat, 15 Aug 1998 23:43:37 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: FILEUTILS-3_16u~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b07a5a108e8d3cc308cc70fb58fbaaf617fa5adb;p=thirdparty%2Fcoreutils.git *** empty log message *** --- diff --git a/tests/ls-2/Fetish.pm b/tests/ls-2/Fetish.pm index ee0207d1e0..d20640924b 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 {