summaryrefslogtreecommitdiff
path: root/lib/bytes.t
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2013-07-15 16:06:46 +1000
committerTony Cook <tony@develop-help.com>2013-08-12 15:13:01 +1000
commitac993614a7619e3e09c31ed0d7721bede551376a (patch)
tree88c87edef163862b9c82ffb5424f3f5a12441d6c /lib/bytes.t
parent8140a7a801e37d147db0e5a8d89551d9d77666e0 (diff)
downloadperl-ac993614a7619e3e09c31ed0d7721bede551376a.tar.gz
[perl #117355] very basic tests for [ul]c(first)? under use bytes
the [lu]cfirst tests are TODO due to #117355
Diffstat (limited to 'lib/bytes.t')
-rw-r--r--lib/bytes.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/bytes.t b/lib/bytes.t
index c1ea9ead80..6ac18df416 100644
--- a/lib/bytes.t
+++ b/lib/bytes.t
@@ -5,7 +5,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 20;
+plan tests => 24;
my $a = chr(0x100);
@@ -28,6 +28,8 @@ is(bytes::chr(0x100), chr(0), "bytes::chr sanity check");
}
my $c = chr(0x100);
+my $c2 = chr(0x2c7); # a unicode character that doesn't fold
+utf8::encode(my $c2_utf8 = $c2);
{
use bytes;
@@ -56,6 +58,13 @@ my $c = chr(0x100);
is(bytes::rindex($c, "\xc4"), 0, "bytes::rindex under use bytes looks at bytes");
}
+ # [perl #117355] [lu]cfirst don't respect 'use bytes'
+ # and if there's other tests for lc/uc under bytes I didn't find them
+ is(lc($c2), $c2_utf8, "lc under use bytes returns bytes");
+ is(uc($c2), $c2_utf8, "uc under use bytes returns bytes");
+ local $TODO = "[perl #117355] [lu]cfirst don't respect 'use bytes'";
+ is(lcfirst($c2), $c2_utf8, "lcfirst under use bytes returns bytes");
+ is(ucfirst($c2), $c2_utf8, "unfirst under use bytes returns bytes");
}
{