diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-02-09 21:18:48 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-02-09 22:46:03 -0700 |
commit | 17a3df4c6a07533e2c03c46fdd27e3ee295d61d0 (patch) | |
tree | e0ee85739319695ef7c320b28890ad2f49ebade2 /t/op/qq.t | |
parent | 3efe3cb8c0229e34f5e21774151ddbfdcf27adf4 (diff) | |
download | perl-17a3df4c6a07533e2c03c46fdd27e3ee295d61d0.tar.gz |
Fix up \cX for 5.14
Throughout 5.13 there was temporary code to deprecate and forbid
certain values of X following a \c in qq strings. This patch fixes
this to the final 5.14 semantics.
These are:
1) a utf8 non-ASCII character will croak. This is the same
behavior as pre-5.13, but it gives a correct error message, rather than
the malformed utf8 message previously.
2) \c{ and \cX where X is above ASCII will generate a deprecated
message. The intent is to remove these capabilities in 5.16. The
original agreement was to croak on above ASCII, but that does violate
our stability policy, so I'm deprecating it instead.
3) A non-deprecated warning is generated for all other \cX; this is the
same as throughout the 5.13 series.
I did not have the tuits to use \c{} as I had planned in 5.14, but \N{}
can be used instead.
Diffstat (limited to 't/op/qq.t')
-rw-r--r-- | t/op/qq.t | 22 |
1 files changed, 1 insertions, 21 deletions
@@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; } -print q(1..30 +print q(1..28 ); # This is() function is written to avoid "" @@ -68,26 +68,6 @@ is ("a\o{120}b", "a" . chr(0x50) . "b"); is ("a\o{400}b", "a" . chr(0x100) . "b"); is ("a\o{1000}b", "a" . chr(0x200) . "b"); -# These kludged tests should change when we remove the temporary fatal error -# in util.c for "\c{". And, the warning there should probably not be -# deprecated; See [perl #75138]. -# BE SURE TO remove the message from the __DATA__ section of porting/diag.t, -# and to verify the messages in util.c are adequately covered in -# perldiag.pod, and to revise the explanatory wording that is there now. -my $value = eval '"\c{ACK}"'; -if ($^V lt v5.13.0 || $^V ge v5.14.0) { - is ($@, ""); - is ($value, ";ACK}"); -} -elsif ($@ ne "") { # 5.13 series, expect the eval to fail, so pass it. - is ("1", "1"); # This .t only has 'is' at its disposal - is ("1", "1"); -} -else { # Something wrong; someone has removed the failure in util.c - is ("Should fail for 5.13 until fix test", "0"); - is ("1", "1"); -} - # This caused a memory fault no warnings "utf8"; is ("abc", eval qq[qq\x{8000_0000}abc\x{8000_0000}]) |