From: Rafael Garcia-Suarez Date: Fri, 6 Jul 2007 15:52:40 +0000 (+0000) Subject: Make this new test be skipped with 5.8.x X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c63d38c6752f01266506f029548537ad9ecd081d;p=p5sagit%2Fp5-mst-13.2.git Make this new test be skipped with 5.8.x p4raw-id: //depot/perl@31541 --- diff --git a/lib/base/t/fields-base.t b/lib/base/t/fields-base.t index ab4daf5..e489f7b 100644 --- a/lib/base/t/fields-base.t +++ b/lib/base/t/fields-base.t @@ -162,16 +162,19 @@ like $@, qr/^No such $Field "notthere" in variable \$obj3 of type D3/, "Compile failure of undeclared fields (helem)"; -# Slices -# We should get compile time failures field name typos -eval q(return; my D3 $obj3 = $obj2; my $k; @$obj3{$k,'notthere'} = ()); -like $@, - qr/^No such $Field "notthere" in variable \$obj3 of type D3/, - "Compile failure of undeclared fields (hslice)"; -eval q(return; my D3 $obj3 = $obj2; my $k; @{$obj3}{$k,'notthere'} = ()); -like - $@, qr/^No such $Field "notthere" in variable \$obj3 of type D3/, - "Compile failure of undeclared fields (hslice (block form))"; +SKIP: { + # Slices + # We should get compile time failures field name typos + skip "Doesn't work before 5.9", 2 if $] < 5.009; + eval q(return; my D3 $obj3 = $obj2; my $k; @$obj3{$k,'notthere'} = ()); + like $@, + qr/^No such $Field "notthere" in variable \$obj3 of type D3/, + "Compile failure of undeclared fields (hslice)"; + eval q(return; my D3 $obj3 = $obj2; my $k; @{$obj3}{$k,'notthere'} = ()); + like + $@, qr/^No such $Field "notthere" in variable \$obj3 of type D3/, + "Compile failure of undeclared fields (hslice (block form))"; +} @$obj1{"_b1", "b1"} = (17, 29); is( $obj1->{_b1}, 17 );