3 use Test::More tests => 8;
5 use Regexp::Wildcards qw/wc2re_unix wc2re_win32/;
7 ok(wc2re_unix('a,b,c') eq 'a\\,b\\,c', 'unix: commas outside of brackets 1');
8 ok(wc2re_unix('a\\,b\\\\\\,c') eq 'a\\,b\\\\\\,c',
9 'unix: commas outside of brackets 2');
10 ok(wc2re_unix(',a,b,c\\\\,') eq '\\,a\\,b\\,c\\\\\\,',
11 'unix: commas outside of brackets at begin/ed');
13 ok(wc2re_win32('a,b\\\\,c') eq '(?:a|b\\\\|c)', 'win32: commas');
14 ok(wc2re_win32('a\\,b\\\\,c') eq '(?:a\\,b\\\\|c)', 'win32: escaped commas 1');
15 ok(wc2re_win32('a\\,b\\\\\\,c') eq 'a\\,b\\\\\\,c', 'win32: escaped commas 2');
17 ok(wc2re_win32(',a,b\\\\,') eq '(?:|a|b\\\\|)', 'win32: commas at begin/end');
18 ok(wc2re_win32('\\,a,b\\\\\\,') eq '(?:\\,a|b\\\\\\,)',
19 'win32: escaped commas at begin/end');