summaryrefslogtreecommitdiff
path: root/t/op/hashwarn.t
diff options
context:
space:
mode:
authorMike Guy <mjtg@cam.ac.uk>2002-01-11 18:36:33 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-12 00:02:05 +0000
commitb21befc10a2adba57c505b26af5b35adc507bf13 (patch)
tree50f1e043f96c86ac8aaa049456026dc79e1b0b09 /t/op/hashwarn.t
parent0904bc86c896844c90e158fde0faac617014287e (diff)
downloadperl-b21befc10a2adba57c505b26af5b35adc507bf13.tar.gz
Correct misleading error message
Message-Id: <E16P6XZ-0005kA-00@draco.cus.cam.ac.uk> hash assignment -> anonymous hash p4raw-id: //depot/perl@14200
Diffstat (limited to 't/op/hashwarn.t')
-rwxr-xr-xt/op/hashwarn.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/op/hashwarn.t b/t/op/hashwarn.t
index 8466a7196e..3db2b46917 100755
--- a/t/op/hashwarn.t
+++ b/t/op/hashwarn.t
@@ -45,7 +45,8 @@ sub test_warning ($$$) {
# print "# $num: $got\n";
}
-my $odd_msg = '/^Odd number of elements in hash/';
+my $odd_msg = '/^Odd number of elements in hash assignment/';
+my $odd_msg2 = '/^Odd number of elements in anonymous hash/';
my $ref_msg = '/^Reference found where even-sized list expected/';
{
@@ -56,7 +57,7 @@ my $ref_msg = '/^Reference found where even-sized list expected/';
test_warning 2, shift @warnings, $odd_msg;
%hash = { 1..3 };
- test_warning 3, shift @warnings, $odd_msg;
+ test_warning 3, shift @warnings, $odd_msg2;
test_warning 4, shift @warnings, $ref_msg;
%hash = [ 1..3 ];