summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-20 06:35:54 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-20 06:35:54 +0000
commit1ac95999ae1a7fa7cd4cdbaed612a3b867560f23 (patch)
treee07c91afce50444d223b3b6f0ac392ac7293401c /t
parentf502af34bb5cd3de880fbb34674c5453df0e98d0 (diff)
downloadperl-1ac95999ae1a7fa7cd4cdbaed612a3b867560f23.tar.gz
Make also hex() and oct() to croak if their arguments
cannot be downgraded (that is, if they contain wide characters), just like crypt() does (and use the croak feature of sv_utf8_downgrade()). p4raw-id: //depot/perl@14354
Diffstat (limited to 't')
-rwxr-xr-xt/op/oct.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/op/oct.t b/t/op/oct.t
index 06bcf3e402..f996b48975 100755
--- a/t/op/oct.t
+++ b/t/op/oct.t
@@ -2,7 +2,7 @@
# tests 51 onwards aren't all warnings clean. (intentionally)
-print "1..69\n";
+print "1..71\n";
my $test = 1;
@@ -145,3 +145,8 @@ test ('hex', "x3A", 0x3A);
test ('hex', "0x4", 4);
test ('hex', "x4", 4);
+eval '$a = oct "10\x{100}"';
+print $@ =~ /Wide character/ ? "ok $test\n" : "not ok $test\n"; $test++;
+
+eval '$a = hex "ab\x{100}"';
+print $@ =~ /Wide character/ ? "ok $test\n" : "not ok $test\n"; $test++;