diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-10-24 22:16:38 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-24 22:16:38 -0700 |
commit | c73c07e4506ef659dc543d7755cba281bfd78e6d (patch) | |
tree | a7567951a0aa16b1ec68abc71ff6ab3d4201e7f2 /ext/File-Glob | |
parent | 222032e91d99fdc6aa6929e916dce4fc11570415 (diff) | |
download | perl-c73c07e4506ef659dc543d7755cba281bfd78e6d.tar.gz |
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.
Diffstat (limited to 'ext/File-Glob')
-rw-r--r-- | ext/File-Glob/t/basic.t | 11 |
1 files 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], (<a'b' c>)[0], "a'b' with and without spaces"; is +(<a"b">)[0], (<a"b" c>)[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'; |