X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fhashwarn.t;h=50c993939fae56952c542ad449bb35bad85516f0;hb=86f12da24a95dda38e6d599b881a5cca226226e4;hp=3db2b4691751da3386f36f48759cce9c0c616213;hpb=b21befc10a2adba57c505b26af5b35adc507bf13;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/hashwarn.t b/t/op/hashwarn.t index 3db2b46..50c9939 100755 --- a/t/op/hashwarn.t +++ b/t/op/hashwarn.t @@ -66,12 +66,18 @@ my $ref_msg = '/^Reference found where even-sized list expected/'; %hash = sub { print "ok" }; test_warning 6, shift @warnings, $odd_msg; + # Old pseudo-hash syntax, now removed. my $avhv = [{x=>1,y=>2}]; - %$avhv = (x=>13,'y'); - test_warning 7, shift @warnings, $odd_msg; - - %$avhv = 'x'; - test_warning 8, shift @warnings, $odd_msg; + eval { + %$avhv = (x=>13,'y'); + }; + test 7, $@ =~ /^Not a HASH reference/; + + # Old pseudo-hash syntax, since removed. + eval { + %$avhv = 'x'; + }; + test 8, $@ =~ /^Not a HASH reference/; $_ = { 1..10 }; test 9, ! @warnings, "Unexpected warning";