diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-12-18 22:10:49 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-12-18 22:10:49 -0800 |
commit | b7e6151cbc27942266f736d4706550bc35a29639 (patch) | |
tree | e2509b6f65b61c4fa8ea231ccc416399acd729d6 /t/re | |
parent | 61a8c39717905c2678b615a1788db98001be8272 (diff) | |
download | perl-b7e6151cbc27942266f736d4706550bc35a29639.tar.gz |
Also allow /\N{}/
See 4cbd7e223 and ticket #123417.
If a charnames handler returns the empty string for a particular name,
then the regular expression stringifies with an empty \N{} in it.
This needs to round-trip properly (eval "/$qr/"), just like \N{U+...}.
Diffstat (limited to 't/re')
-rw-r--r-- | t/re/pat_advanced.t | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t index ea8974129b..c210e2e06e 100644 --- a/t/re/pat_advanced.t +++ b/t/re/pat_advanced.t @@ -2356,6 +2356,12 @@ EOP "afoot" =~ eval "qr/$qr/"; is "$1" || $@, "foo", 'multichar \N{...} stringified and retoked'; } + { # empty \N{...} tripping roundly + BEGIN { $^H{charnames} = sub { "" } } + my $qr = qr$(a\N{foo}t)$; + "at" =~ eval "qr/$qr/"; + is "$1" || $@, "at", 'empty \N{...} stringified and retoked'; + } # |