diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-16 18:00:07 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-16 18:00:07 -0800 |
commit | b6a062341e3fe0df4e131975918361a0445e8673 (patch) | |
tree | 565ed8174a0896b7b0b99a6e06abf74334ae7278 /lib/diagnostics.t | |
parent | 6728c8514a4b615a9cb94cab0e0682f066cefae1 (diff) | |
download | perl-b6a062341e3fe0df4e131975918361a0445e8673.tar.gz |
Teach splain about %X
Diffstat (limited to 'lib/diagnostics.t')
-rw-r--r-- | lib/diagnostics.t | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/diagnostics.t b/lib/diagnostics.t index 4e5ab8230b..d0d43646ba 100644 --- a/lib/diagnostics.t +++ b/lib/diagnostics.t @@ -5,7 +5,7 @@ BEGIN { @INC = 'lib'; } -use Test::More tests => 10; +use Test::More tests => 11; BEGIN { my $w; @@ -45,7 +45,7 @@ like $warning, qr/using lex_stuff_pvn or similar/, 'L<foo|bar/baz>'; # Multiple messages with the same description seek STDERR, 0,0; $warning = ''; -warn 'Code point 0x%X is not Unicode, may not be portable'; +warn 'Code point 0xBEE5 is not Unicode, may not be portable'; like $warning, qr/W utf8/, 'Message sharing its description with the following message'; @@ -61,6 +61,12 @@ $warning = ''; warn "Bad arg length for us, is 4, should be 42"; like $warning, qr/In C parlance/, '%u works'; +# Test for %X +seek STDERR, 0,0; +$warning = ''; +warn "Unicode surrogate U+C0FFEE is illegal in UTF-8"; +like $warning, qr/You had a UTF-16 surrogate/, '%X'; + # Strip S<> seek STDERR, 0,0; $warning = ''; |