diff options
author | Craig A. Berry <craigberry@mac.com> | 2001-11-01 18:03:52 -0600 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-02 05:04:05 +0000 |
commit | 18e548ce1d77b525add551f80ef335f852cf9389 (patch) | |
tree | d19978ee46436b434ade49797790ba55740181c5 /lib/AutoSplit.t | |
parent | a81e5e2ecfdba68742ad72b753ace2dd711691b5 (diff) | |
download | perl-18e548ce1d77b525add551f80ef335f852cf9389.tar.gz |
AutoSplit.t clean-up for VMS
Message-Id: <5.1.0.14.2.20011101235844.02cd4e50@exchi01>
p4raw-id: //depot/perl@12806
Diffstat (limited to 'lib/AutoSplit.t')
-rw-r--r-- | lib/AutoSplit.t | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/AutoSplit.t b/lib/AutoSplit.t index e913f344bb..dbd003d446 100644 --- a/lib/AutoSplit.t +++ b/lib/AutoSplit.t @@ -67,16 +67,6 @@ sub split_a_file { return $output; } -# Brackets are valid in VMS filespecs and this test puts filespecs -# into regexes a lot. - -sub _escape_brackets { - my $str = shift; - $str =~ s/\[/\\\[/g; - $str =~ s/\]/\\\]/g; - return $str; -} - my $i = 0; my $dir = File::Spec->catdir($incdir, 'auto'); if ($^O eq 'VMS') { @@ -115,9 +105,8 @@ foreach (@tests) { while ($output =~ m/(\[.+\])/) { $filespec = $1; $replacement = VMS::Filespec::unixify($filespec); - $filespec = _escape_brackets($filespec); $replacement =~ s/\/$//; - $output =~ s/$filespec/$replacement/; + $output =~ s/\Q$filespec\E/$replacement/; } } @@ -174,7 +163,6 @@ foreach (@tests) { if ($args{Tests}) { foreach my $code (split /\n/, $args{Tests}) { next if $code =~ /^\#/; - $code =~ s/\[(File::Spec->catfile\(.*\))\]/[_escape_brackets($1)]/ if $^O eq 'VMS'; defined eval $code or fail(), print "# Code: $code\n# Error: $@"; } } |