In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/83f61a2e8a4636d8f484021fe65d9a4b9bd2a5de?hp=af00134636ffe4172cbffeaed3bbad802e58d8a0>

- Log -----------------------------------------------------------------
commit 83f61a2e8a4636d8f484021fe65d9a4b9bd2a5de
Author: Craig A. Berry <[email protected]>
Date:   Sat Oct 9 22:31:37 2010 -0500

    Don't assume filenames can contain parentheses
    in the new File::DosGlob tests that came in with
    2f3c8ce922663caa9b02d9fddae7536225b6f95d.
-----------------------------------------------------------------------

Summary of changes:
 lib/File/DosGlob.t |   44 +++++++++++++++++++++++++-------------------
 1 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/lib/File/DosGlob.t b/lib/File/DosGlob.t
index 71a5db6..32eb276 100644
--- a/lib/File/DosGlob.t
+++ b/lib/File/DosGlob.t
@@ -164,30 +164,36 @@ print "ok 10\n";
 EOT
 
 # Test that a glob pattern containing ()'s works.
-# NB. The spaces in the glob patters need to be backslash escaped.
+# NB. The spaces in the glob patterns need to be backslash escaped.
 my $filename_containing_parens = "foo (123) bar";
-open(TOUCH, ">", $filename_containing_parens) && close(TOUCH)
-    or die "can't create '$filename_containing_parens': $!";
+if (open(TOUCH, ">", $filename_containing_parens)) {
+    close(TOUCH);
 
-...@r = ();
-eval { @r = File::DosGlob::glob("foo\\ (*") };
-print +($@ ? "not " : ""), "ok 11\n";
-print "not " unless (@r == 1 and $r[0] eq $filename_containing_parens);
-print "ok 12\n";
+    @r = ();
+    eval { @r = File::DosGlob::glob("foo\\ (*") };
+    print +($@ ? "not " : ""), "ok 11\n";
+    print "not " unless (@r == 1 and $r[0] eq $filename_containing_parens);
+    print "ok 12\n";
 
-...@r = ();
-eval { @r = File::DosGlob::glob("*)\\ bar") };
-print +($@ ? "not " : ""), "ok 13\n";
-print "not " unless (@r == 1 and $r[0] eq $filename_containing_parens);
-print "ok 14\n";
+    @r = ();
+    eval { @r = File::DosGlob::glob("*)\\ bar") };
+    print +($@ ? "not " : ""), "ok 13\n";
+    print "not " unless (@r == 1 and $r[0] eq $filename_containing_parens);
+    print "ok 14\n";
 
-...@r = ();
-eval { @r = File::DosGlob::glob("foo\\ (1*3)\\ bar") };
-print +($@ ? "not " : ""), "ok 15\n";
-print "not " unless (@r == 1 and $r[0] eq $filename_containing_parens);
-print "ok 16\n";
+    @r = ();
+    eval { @r = File::DosGlob::glob("foo\\ (1*3)\\ bar") };
+    print +($@ ? "not " : ""), "ok 15\n";
+    print "not " unless (@r == 1 and $r[0] eq $filename_containing_parens);
+    print "ok 16\n";
 
-unlink $filename_containing_parens;
+    1 while unlink $filename_containing_parens;
+}
+else {
+    for (11..16) {
+        print "ok $_ # skip - can't create '$filename_containing_parens': 
$!\n";
+    }
+}
 
 # Test the globbing of a drive relative pattern such as "c:*.pl".
 # NB. previous versions of DosGlob inserted "./ after the drive letter to

--
Perl5 Master Repository

Reply via email to