X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FRegexp-Wildcards.git;a=blobdiff_plain;f=t%2F11-commas.t;h=9720a9d8bf0e891071384dbd77fbb00d31899010;hp=d616e9b4a9703420d4a3c9de302dc6cb8848392a;hb=5468cc9fedae639e785117ab38807d857c84bdec;hpb=d3841a7816c3e170f292ced4a5818ab252574300 diff --git a/t/11-commas.t b/t/11-commas.t index d616e9b..9720a9d 100644 --- a/t/11-commas.t +++ b/t/11-commas.t @@ -1,15 +1,22 @@ #!perl -T -use Test::More tests => 7; +use strict; +use warnings; + +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');