This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pos.t: test something I almost broke
authorFather Chrysostomos <sprout@cpan.org>
Tue, 23 Jul 2013 21:38:30 +0000 (14:38 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 23 Jul 2013 21:55:14 +0000 (14:55 -0700)
t/op/pos.t

index 4eca3a6..b9691ad 100644 (file)
@@ -6,7 +6,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 21;
+plan tests => 22;
 
 $x='banana';
 $x=~/.a/g;
@@ -36,6 +36,8 @@ $x = "\x{100}BC";
 $x =~ m/.*/g;
 is(pos $x, 3, "utf8_mg_len_cache_update() test");
 
+is(scalar pos $x, 3, "rvalue pos() utf8 test");
+
 
 my $destroyed;
 { package Class; DESTROY { ++$destroyed; } }