]> git.vpit.fr Git - perl/modules/Regexp-Wildcards.git/blobdiff - t/11-commas.t
Importing Regexp-Wildcards-0.02.tar.gz
[perl/modules/Regexp-Wildcards.git] / t / 11-commas.t
index d616e9b4a9703420d4a3c9de302dc6cb8848392a..ba6703a2ea468eb6ec03d10fc3bfe3d1f9c2a2cc 100644 (file)
@@ -1,15 +1,19 @@
 #!perl -T
 
-use Test::More tests => 7;
+use Test::More tests => 8;
 
 use Regexp::Wildcards qw/wc2re_unix wc2re_win32/;
 
-ok((not defined wc2re_unix('a,b,c')), 'unix: no commas allowed out of brackets');
-ok(wc2re_unix('a\\,b\\\\\\,c') eq 'a\\,b\\\\\\,c', 'unix: no commas allowed out of brackets');
+ok(wc2re_unix('a,b,c') eq 'a\\,b\\,c', 'unix: commas outside of brackets 1');
+ok(wc2re_unix('a\\,b\\\\\\,c') eq 'a\\,b\\\\\\,c',
+   'unix: commas outside of brackets 2');
+ok(wc2re_unix(',a,b,c\\\\,') eq '\\,a\\,b\\,c\\\\\\,',
+   'unix: commas outside of brackets at begin/ed');
 
 ok(wc2re_win32('a,b\\\\,c') eq '(?:a|b\\\\|c)', 'win32: commas');
 ok(wc2re_win32('a\\,b\\\\,c') eq '(?:a\\,b\\\\|c)', 'win32: escaped commas 1');
 ok(wc2re_win32('a\\,b\\\\\\,c') eq 'a\\,b\\\\\\,c', 'win32: escaped commas 2');
 
 ok(wc2re_win32(',a,b\\\\,') eq '(?:|a|b\\\\|)', 'win32: commas at begin/end');
-ok(wc2re_win32('\\,a,b\\\\\\,') eq '(?:\\,a|b\\\\\\,)', 'win32: escaped commas at begin/end');
+ok(wc2re_win32('\\,a,b\\\\\\,') eq '(?:\\,a|b\\\\\\,)',
+   'win32: escaped commas at begin/end');