Browse Source

- updated testsuite to reflect \x00 -> \x{00} changes

master
Andreas Romeyke 2 months ago
parent
commit
4c707f4f58
1 changed files with 13 additions and 13 deletions
  1. +13
    -13
      t/File/FormatIdentification/Regex.t

+ 13
- 13
t/File/FormatIdentification/Regex.t View File

@@ -63,12 +63,12 @@ is( peep_hole_optimizer("^((foo)|((bar)))"),
"^((foo)|(bar))", "peep_hole_optimizer('^((foo)|((bar)))')" );
is( peep_hole_optimizer("(bar|baz)"),
"(ba(r|z))", "peep_hole_optimizer('(bar|baz)')" );
is( peep_hole_optimizer('(\x42|\x43)'),
'(\x42|\x43)', 'peep_hole_optimizer(\'(\x42|\x43)\')' );
is( peep_hole_optimizer('(\x34|\x44)'),
'(\x34|\x44)', 'peep_hole_optimizer(\'(\x34|\x44)\')' );
is( peep_hole_optimizer('(\x344|\x444)'),
'(\x344|\x444)', 'peep_hole_optimizer(\'(\x344|\x444)\')' );
is( peep_hole_optimizer('(\x{42}|\x{43})'),
'(\x{42}|\x{43})', 'peep_hole_optimizer(\'(\x{42}|\x{43})\')' );
is( peep_hole_optimizer('(\x{34}|\x{44})'),
'(\x{34}|\x{44})', 'peep_hole_optimizer(\'(\x{34}|\x{44})\')' );
is( peep_hole_optimizer('(\x{344}|\x{444})'),
'(\x{344}|\x{444})', 'peep_hole_optimizer(\'(\x{344}|\x{444})\')' );
is( peep_hole_optimizer("((bar)|(baz))"),
"(ba(r|z))", "peep_hole_optimizer('((bar)|(baz))')" );
is( peep_hole_optimizer("(barf|bazaar)"),
@@ -84,16 +84,16 @@ is( peep_hole_optimizer("barbara"),
is( peep_hole_optimizer("toooor"), "to{4}r", "peep_hole_optimizer('toooor')" );
is( peep_hole_optimizer("toooooooooooor"),
"to{12}r", "peep_hole_optimizer('toooooooooor')" );
is( peep_hole_optimizer('\x00\x00\x00\x00\x00'),
'\x00{5}', 'peep_hole_optimizer(\'\x00\x00\x00\x00\x00\')' );
is( peep_hole_optimizer('\x{00}\x{00}\x{00}\x{00}\x{00}'),
'\x{00}{5}', 'peep_hole_optimizer(\'\x{00}\x{00}\x{00}\x{00}\x{00}\')' );
is(
peep_hole_optimizer(
'\A(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC2)'),
'\A(\x00{12}\xC2)',
'peep_hole_optimizer(\'\A(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC2)\')'
'\A(\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{C2})'),
'\A(\x{00}{12}\x{C2})',
'peep_hole_optimizer(\'\A(\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{00}\x{C2})\')'
);
is( peep_hole_optimizer('\x0000000007006\x20'),
'\x000{7}7006\x20', 'peep_hole_optimizer(\'\x0000000007006\x20\')' );
is( peep_hole_optimizer('\x{00}00000007006\x{20}'),
'\x{00}0{7}7006\x{20}', 'peep_hole_optimizer(\'\x{00}00000007006\x{20}\')' );
is( peep_hole_optimizer("rhabarbarbarabarbara"),
"rha(bar){3}a(bar){2}a", "peep_hole_optimizer('rhabarbarbarabarbara')" );
is( peep_hole_optimizer("a{100000}"),


Loading…
Cancel
Save