Restore VMS glob skip removed in 1bb8785a.
authorCraig A. Berry <craigberry@mac.com>
Fri, 4 Nov 2011 16:10:02 +0000 (11:10 -0500)
committerCraig A. Berry <craigberry@mac.com>
Fri, 4 Nov 2011 16:10:02 +0000 (11:10 -0500)
The test appears to be checking the handling of double quotes in
File::Glob::csh_glob(), but on VMS, we're not using that, we're
using Perl_vms_start_glob().  Perhaps the latter should do some
quote removal as well.

t/run/fresh_perl.t

index 0aaf28a..9c76a64 100644 (file)
@@ -763,18 +763,25 @@ foo at - line 1.
 -lw
 # Make sure the presence of the CORE::GLOBAL::glob typeglob does not affect
 # whether File::Glob::csh_glob is called.
-++$INC{"File/Glob.pm"}; # prevent it from loading
-my $called1 =
-my $called2 = 0;
-*File::Glob::csh_glob = sub { ++$called1 };
-my $output1 = eval q{ glob(q(./"TEST")) };
-undef *CORE::GLOBAL::glob; # but leave the typeglob itself there
-++$CORE::GLOBAL::glob if 0; # "used only once"
-undef *File::Glob::csh_glob; # avoid redefinition warnings
-*File::Glob::csh_glob = sub { ++$called2 };
-my $output2 = eval q{ glob(q(./"TEST")) };
-print "ok1" if $called1 eq $called2;
-print "ok2" if $output1 eq $output2;
+if ($^O eq 'VMS') {
+    # A pattern with a double quote in it is a syntax error to LIB$FIND_FILE
+    # Should we strip quotes in Perl_vms_start_glob the way csh_glob() does?
+    print "ok1\nok2\n";
+}
+else {
+    ++$INC{"File/Glob.pm"}; # prevent it from loading
+    my $called1 =
+    my $called2 = 0;
+    *File::Glob::csh_glob = sub { ++$called1 };
+    my $output1 = eval q{ glob(q(./"TEST")) };
+    undef *CORE::GLOBAL::glob; # but leave the typeglob itself there
+    ++$CORE::GLOBAL::glob if 0; # "used only once"
+    undef *File::Glob::csh_glob; # avoid redefinition warnings
+    *File::Glob::csh_glob = sub { ++$called2 };
+    my $output2 = eval q{ glob(q(./"TEST")) };
+    print "ok1" if $called1 eq $called2;
+    print "ok2" if $output1 eq $output2;
+}
 EXPECT
 ok1
 ok2