X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fbasic.t;h=0dd3e9e006eb44c523442dba5621131a5938022d;hb=25337ff2c3668faa9381c52b5b7d9e781a3b19a7;hp=918543dac5b8b0807ac88af4f25106f5a97161fb;hpb=ef110db4435322c8d7cbb7ea69f3c96b9056fba0;p=p5sagit%2FDevel-Size.git diff --git a/t/basic.t b/t/basic.t index 918543d..0dd3e9e 100644 --- a/t/basic.t +++ b/t/basic.t @@ -10,7 +10,7 @@ can_ok ('Devel::Size', qw/ /); die ("Uhoh, test uses an outdated version of Devel::Size") - unless is ($Devel::Size::VERSION, '0.77_51', 'VERSION MATCHES'); + unless is ($Devel::Size::VERSION, '0.80_50', 'VERSION MATCHES'); ############################################################################# # some basic checks: @@ -118,7 +118,10 @@ foreach(['undef', total_size(undef)], my $before_size = total_size($uurk); my $before_length = length $uurk; cmp_ok($before_size, '>', $before_length, 'Size before is sane'); - $uurk =~ s/Perl //; + # As of 5.20.0, s/// doesn't trigger COW. + # Seems that formline is about the the only thing left that reliably calls + # sv_chop. See CPAN #95493, perl #122322 + formline '^<<<<~', $uurk; is(total_size($uurk), $before_size, "Size doesn't change because OOK is used"); cmp_ok(length $uurk, '<', $before_size, 'but string is shorter');