From c73c07e4506ef659dc543d7755cba281bfd78e6d Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Mon, 24 Oct 2011 22:16:38 -0700 Subject: Make new basic.t glob tests work on Win & VMS I forgot about the default PERL_EXTERNAL_GLOB setting on VMS and the special treatment of backslashes on Windows in bsd_glob.c. --- ext/File-Glob/t/basic.t | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ext/File-Glob/t/basic.t b/ext/File-Glob/t/basic.t index bdf0d9497c..f7a2f1f220 100644 --- a/ext/File-Glob/t/basic.t +++ b/ext/File-Glob/t/basic.t @@ -10,7 +10,7 @@ BEGIN { } } use strict; -use Test::More tests => 23; +use Test::More tests => 22; BEGIN {use_ok('File::Glob', ':glob')}; use Cwd (); @@ -237,8 +237,11 @@ is(&File::Glob::GLOB_ERROR, 0, "Successfuly ignored unsupported flag"); package frimpy; # get away from the glob override, so we can test csh_glob, use Test::More; # which is perl's default +# In case of PERL_EXTERNAL_GLOB: +use subs 'glob'; +BEGIN { *glob = \&File::Glob::csh_glob } + is +(glob "a'b'")[0], ()[0], "a'b' with and without spaces"; is +()[0], ()[0], 'a"b" with and without spaces'; -is <\\*>, '*', 'backslashes without spaces'; -is_deeply [sort <\\* .\\*>], [sort qw<* .*>], 'backslashes with spaces'; -is <\\ >, ' ', 'final escaped space'; +is_deeply [<\\* .\\*>], [<\\*>,<.\\*>], 'backslashes with(out) spaces'; +like <\\ >, qr/^\\? \z/, 'final escaped space'; -- cgit v1.2.1