From 11454c594f22abc5945e69a46fc965363dbf326e Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 15 Jan 2011 13:42:58 -0700 Subject: 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. --- t/re/re_tests | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 't') 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} -- cgit v1.2.1