summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEric Brine <ikegami@adaelis.com>2010-08-21 20:14:08 -0700
committerRafael Garcia-Suarez <rgs@consttype.org>2010-08-31 00:19:35 +0200
commit96d9949f9ef2c5c9eb1346746102adfa7f3dfaeb (patch)
treec5afa1d49c4590459c5ecd923e56493329cc0b6b /lib
parent47b13905e23c2a72acdde8bb4669e25e5eaefec4 (diff)
downloadperl-96d9949f9ef2c5c9eb1346746102adfa7f3dfaeb.tar.gz
TODO tests for avoid needless use of UTF8=1 format [RT#56336]
Some literals (e.g. q'abc') don't set the UTF8 flag for pure ASCII literals. Others (e.g. -abc) do. This should be consistent.
Diffstat (limited to 'lib')
-rw-r--r--lib/utf8.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/utf8.t b/lib/utf8.t
index a5827f48c0..7f8481c928 100644
--- a/lib/utf8.t
+++ b/lib/utf8.t
@@ -37,7 +37,7 @@ no utf8; # Ironic, no?
#
#
-plan tests => 150;
+plan tests => 157;
{
# bug id 20001009.001
@@ -451,3 +451,15 @@ SKIP: {
ok(utf8::valid(chr(0x270)), "0x270");
ok(utf8::valid(chr(0x280)), "0x280");
}
+
+{
+ use utf8;
+ ok( !utf8::is_utf8( "asd" ), "Wasteful format - qq{}" );
+ ok( !utf8::is_utf8( 'asd' ), "Wasteful format - q{}" );
+ ok( !utf8::is_utf8( qw(asd) ), "Wasteful format - qw{}" );
+ ok( !utf8::is_utf8( (asd => 1)[0] ), "Wasteful format - =>" );
+ local $TODO = 'Avoid needless use of UTF8=1 format [RT#56336]';
+ ok( !utf8::is_utf8( asd ), "Wasteful format - bareword" );
+ ok( !utf8::is_utf8( -asd ), "Wasteful format - -word" );
+ ok( !utf8::is_utf8( asd:: ), "Wasteful format - word::" );
+}