From b07a5a108e8d3cc308cc70fb58fbaaf617fa5adb Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 15 Aug 1998 23:43:37 +0000 Subject: *** empty log message *** --- tests/ls-2/Fetish.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tests/ls-2') 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 { -- cgit v1.2.3-70-g09d2