diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-01-15 13:42:58 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-01-16 08:18:54 -0700 |
commit | 11454c594f22abc5945e69a46fc965363dbf326e (patch) | |
tree | 8e51baaf062d5e28410294b9cac63f791c63ced2 /t/re/re_tests | |
parent | f424400810b6af341e96230836690da51c37b812 (diff) | |
download | perl-11454c594f22abc5945e69a46fc965363dbf326e.tar.gz |
Fix \xa0 matching both [\s] [\S], et.al.
This bug stemmed from Latin1 characters not matching any (non-complemented)
character class in /d semantics when the target string is no utf8; but having
unicode semantics when it isn't. The solution here is to add a special flag.
There were several tests that relied on the broken behavior, specifically they
tested that \xff isn't a printable word character even in utf8. I changed the
deparse test to instead use a non-printable code point, and I changed the ones
in re_tests to be TODOs, and will change them back using /a when that is
shortly added.
Diffstat (limited to 't/re/re_tests')
-rw-r--r-- | t/re/re_tests | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/re/re_tests b/t/re/re_tests index 02da1e1bdc..041296aa54 100644 --- a/t/re/re_tests +++ b/t/re/re_tests @@ -628,15 +628,15 @@ $(?<=^(a)) a y $1 a ([[:upper:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB ([[:xdigit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01 ([[:^alpha:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 01 -([[:^alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 __-- ${nulnul}${ffff} +([[:^alnum:]]+) ABcd01Xy__-- ${nulnul}${ffff} yT $1 __-- ${nulnul}${ffff} ([[:^ascii:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${ffff} ([[:^cntrl:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__-- ([[:^digit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd ([[:^lower:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 AB -([[:^print:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ${nulnul}${ffff} +([[:^print:]]+) ABcd01Xy__-- ${nulnul}${ffff} yT $1 ${nulnul}${ffff} ([[:^punct:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy ([[:^space:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 ABcd01Xy__-- -([[:^word:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 -- ${nulnul}${ffff} +([[:^word:]]+) ABcd01Xy__-- ${nulnul}${ffff} yT $1 -- ${nulnul}${ffff} ([[:^upper:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 cd01 ([[:^xdigit:]]+) ABcd01Xy__-- ${nulnul}${ffff} y $1 Xy__-- ${nulnul}${ffff} [[:foo:]] - c - POSIX class [:foo:] unknown @@ -1406,7 +1406,7 @@ foo(\h)bar foo\tbar y $1 \t /\N{U+41}\x{c1}/i a\x{e1} y $& a\x{e1} /[\N{U+41}\x{c1}]/i \x{e1} y $& \x{e1} -[\s][\S] \x{a0}\x{a0} nT - - # Unicode complements should not match same character +[\s][\S] \x{a0}\x{a0} n - - # Unicode complements should not match same character # was generating malformed utf8 '[\x{100}\xff]'i \x{ff} y $& \x{ff} |