[Moose-commits] r7345 - Moose/trunk/t/100_bugs

autarch at code2.0beta.co.uk autarch at code2.0beta.co.uk
Mon Jan 19 17:36:02 GMT 2009


Author: autarch
Date: 2009-01-19 09:36:01 -0800 (Mon, 19 Jan 2009)
New Revision: 7345

Modified:
   Moose/trunk/t/100_bugs/011_DEMOLISH_eats_exceptions.t
Log:
Make the constraint for this subtype much dumber, to avoid failing
tests given some random valid path on someone's file system that we
didn't account for.


Modified: Moose/trunk/t/100_bugs/011_DEMOLISH_eats_exceptions.t
===================================================================
--- Moose/trunk/t/100_bugs/011_DEMOLISH_eats_exceptions.t	2009-01-19 00:50:01 UTC (rev 7344)
+++ Moose/trunk/t/100_bugs/011_DEMOLISH_eats_exceptions.t	2009-01-19 17:36:01 UTC (rev 7345)
@@ -11,8 +11,10 @@
 
 subtype 'FilePath'
     => as 'Str'
-    => where { $_ =~ m#^(/[a-zA-Z0-9_.-]+)+/?$#
-                || $_ =~ m#^([c-zC-Z]:/[a-zA-Z0-9_.-]+)# };
+    # This used to try to _really_ check for a valid Unix or Windows
+    # path, but the regex wasn't quite right, and all we care about
+    # for the tests is that it rejects '/'
+    => where { $_ ne '/' };
 {
     package Baz;
     use Moose;




More information about the Moose-commits mailing list