6 use Test::More tests => 8;
10 my $rw = Regexp::Wildcards->new(); # unix
12 is($rw->convert('a,b,c'), 'a\\,b\\,c', 'unix: commas outside of brackets 1');
13 is($rw->convert('a\\,b\\\\\\,c'), 'a\\,b\\\\\\,c',
14 'unix: commas outside of brackets 2');
15 is($rw->convert(',a,b,c\\\\,'), '\\,a\\,b\\,c\\\\\\,',
16 'unix: commas outside of brackets at begin/ed');
18 $rw = Regexp::Wildcards->new(type => 'commas');
20 is($rw->convert('a,b\\\\,c'), '(?:a|b\\\\|c)', 'win32: commas');
21 is($rw->convert('a\\,b\\\\,c'), '(?:a\\,b\\\\|c)', 'win32: escaped commas 1');
22 is($rw->convert('a\\,b\\\\\\,c'), 'a\\,b\\\\\\,c', 'win32: escaped commas 2');
24 is($rw->convert(',a,b\\\\,'), '(?:|a|b\\\\|)', 'win32: commas at begin/end');
25 is($rw->convert('\\,a,b\\\\\\,'), '(?:\\,a|b\\\\\\,)',
26 'win32: escaped commas at begin/end');