summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-03-19 12:14:26 -0600
committerKarl Williamson <khw@cpan.org>2019-03-19 12:50:49 -0600
commite750debb242ae6fdd7b786405ba167620fb77a2d (patch)
tree79f42c65a6808f1ee2105d06e65a144a61b48b67 /t
parentccad88426c3827a98f048facac304bace92604e7 (diff)
downloadperl-e750debb242ae6fdd7b786405ba167620fb77a2d.tar.gz
Change error wording for empty \x{}
An empty \x{} is unfortunately legal (returning a NUL) except in the scope of "use re 'strict'". Since this is an experimental feature, things like wording changes are allowed. It is unlikely anyone is relying on the precise wording of this fatal error under 'strict', and now all the messages for similar errors are similarly worded.
Diffstat (limited to 't')
-rw-r--r--t/re/reg_mesg.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t
index 872b388c3d..667621e80d 100644
--- a/t/re/reg_mesg.t
+++ b/t/re/reg_mesg.t
@@ -241,7 +241,7 @@ my @death =
'/(?[ \o{} ])/' => 'Empty \o{} {#} m/(?[ \o{}{#} ])/',
'/(?[ \x{defg} ])/' => 'Non-hex character {#} m/(?[ \x{defg{#}} ])/',
'/(?[ \xabcdef ])/' => 'Use \\x{...} for more than two hex characters {#} m/(?[ \xabc{#}def ])/',
- '/(?[ \x{} ])/' => 'Number with no digits {#} m/(?[ \x{}{#} ])/',
+ '/(?[ \x{} ])/' => 'Empty \x{} {#} m/(?[ \x{}{#} ])/',
'/(?[ \cK + ) ])/' => 'Unexpected \')\' {#} m/(?[ \cK + ){#} ])/',
'/(?[ \cK + ])/' => 'Incomplete expression within \'(?[ ])\' {#} m/(?[ \cK + {#}])/',
'/(?[ ( ) ])/' => 'Incomplete expression within \'(?[ ])\' {#} m/(?[ ( ){#} ])/',
@@ -342,9 +342,9 @@ my @death_only_under_strict = (
'm/[\o{789}]/' => 'Non-octal character \'8\'. Resolved as "\o{7}"',
=> 'Non-octal character {#} m/[\o{78{#}9}]/',
'm/\x{}/' => "",
- => 'Number with no digits {#} m/\x{}{#}/',
+ => 'Empty \x{} {#} m/\x{}{#}/',
'm/[\x{}]/' => "",
- => 'Number with no digits {#} m/[\x{}{#}]/',
+ => 'Empty \x{} {#} m/[\x{}{#}]/',
'm/\x{ABCDEFG}/' => 'Illegal hexadecimal digit \'G\' ignored',
=> 'Non-hex character {#} m/\x{ABCDEFG{#}}/',
'm/[\x{ABCDEFG}]/' => 'Illegal hexadecimal digit \'G\' ignored',