X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Flei_external.t;h=51d0af5c6333e52d436ed6722791e5bfab229857;hb=refs%2Fheads%2Fmaster;hp=0ef6633df0282e84c4cf91dff7c1e349c2b3244c;hpb=dd80cd59cf0c90d61257fbfe8176e3312edbb841;p=public-inbox.git diff --git a/t/lei_external.t b/t/lei_external.t index 0ef6633d..51d0af5c 100644 --- a/t/lei_external.t +++ b/t/lei_external.t @@ -17,6 +17,7 @@ is($canon->('/this//path/'), '/this/path', 'extra slashes gone'); is($canon->('/ALL/CAPS'), '/ALL/CAPS', 'caps preserved'); my $glob2re = $cls->can('glob2re'); +is($glob2re->('http://[::1]:1234/foo/'), undef, 'IPv6 URL not globbed'); is($glob2re->('foo'), undef, 'plain string unchanged'); is_deeply($glob2re->('[f-o]'), '[f-o]' , 'range accepted'); is_deeply($glob2re->('*'), '[^/]*?' , 'wildcard accepted'); @@ -28,5 +29,7 @@ is_deeply($glob2re->('{a'), undef, 'open left brace'); is_deeply($glob2re->('a}'), undef, 'open right brace'); is_deeply($glob2re->('*.[ch]'), '[^/]*?\\.[ch]', 'suffix glob'); is_deeply($glob2re->('{[a-z],9,}'), '([a-z]|9|)' , 'brace with range'); +is_deeply($glob2re->('\\{a,b\\}'), undef, 'escaped brace'); +is_deeply($glob2re->('\\\\{a,b}'), '\\\\\\\\(a|b)', 'fake escape brace'); done_testing;