summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-03-16 22:38:20 -0600
committerKarl Williamson <khw@cpan.org>2015-03-18 16:14:37 -0600
commitb6d67071cc036ae5056dfe9b570ba76942fc08f4 (patch)
treefa13bf0bff4cbc76df8df602b33174470e3ab31a /t
parent7a4ca5b4c6cbf0022494a8f350fe000abb4b3034 (diff)
downloadperl-b6d67071cc036ae5056dfe9b570ba76942fc08f4.tar.gz
Fix qr'\N{U+41}' on EBCDIC platforms
Prior to this commit, the regex compiler was relying on the lexer to do the translation from Unicode to native for \N{...} constructs, where it was simpler to do. However, when the pattern is a single-quoted string, it is passed unchanged to the regex compiler, and did not work. Fixing it required some refactoring, though it led to a clean API in a static function. This was spotted by Father Chrysostomos.
Diffstat (limited to 't')
-rw-r--r--t/re/re_tests1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/re/re_tests b/t/re/re_tests
index 89c0dc19e1..2d100395ce 100644
--- a/t/re/re_tests
+++ b/t/re/re_tests
@@ -1433,6 +1433,7 @@ foo(\h)bar foo\tbar y $1 \t
# Verify that \N{U+...} forces Unicode rules
/\N{U+41}\x{c1}/i a\x{e1} y $& a\x{e1}
/[\N{U+41}\x{c1}]/i \x{e1} y $& \x{e1}
+'\N{U+41}' A y $& A # Even for single quoted patterns
/\N{}\xe4/i \xc4 y $& \xc4 # Empty \N{} should change /d to /u
[\s][\S] \x{a0}\x{a0} n - - # Unicode complements should not match same character