summaryrefslogtreecommitdiff
path: root/t/re
diff options
context:
space:
mode:
authorKarl Williamson <khw@khw-desktop.(none)>2010-07-15 17:28:28 -0600
committerDavid Golden <dagolden@cpan.org>2010-07-17 21:50:48 -0400
commitf0a2b745ce6c03aec6412d79ce0b782f20eddce4 (patch)
treed1786b1a4a80f6b848dca1ab4eba6e3ffd5dc5d1 /t/re
parent8e4698ef1ed0da722532bfcc769ba22fe85c4b47 (diff)
downloadperl-f0a2b745ce6c03aec6412d79ce0b782f20eddce4.tar.gz
Add \o{} escape
This commit adds the new construct \o{} to express a character constant by its octal ordinal value, along with ancillary tests and documentation. A function to handle this is added to util.c, and it is called from the 3 parsing places it could occur. The function is a candidate for in-lining, though I doubt that it will ever be used frequently.
Diffstat (limited to 't/re')
-rw-r--r--t/re/re_tests6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/re/re_tests b/t/re/re_tests
index fc29fb6bd5..36a2f4cee5 100644
--- a/t/re/re_tests
+++ b/t/re/re_tests
@@ -1460,5 +1460,11 @@ abc\N{def - c - \\N{NAME} must be resolved by the lexer
[a\400] \x{100} y $& \x{100}
[b\600] \x{180} y $& \x{180}
[c\777] \x{1FF} y $& \x{1FF}
+\o{120} \x{50} y $& \x{50}
+\o{400} \x{100} y $& \x{100}
+\o{1000} \x{200} y $& \x{200}
+[a\o{120}] \x{50} y $& \x{50}
+[a\o{400}] \x{100} y $& \x{100}
+[a\o{1000}] \x{200} y $& \x{200}
# vim: softtabstop=0 noexpandtab