From 9186415c7c91f8b6edd3d2b519adbb950f3f4463 Mon Sep 17 00:00:00 2001 From: usev6 Date: Wed, 15 Oct 2014 22:27:21 +0200 Subject: [PATCH] Extend tests for RT #117773 --- S02-types/baghash.t | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/S02-types/baghash.t b/S02-types/baghash.t index 8ca29fcc6d..09c13e281b 100644 --- a/S02-types/baghash.t +++ b/S02-types/baghash.t @@ -1,7 +1,7 @@ use v6; use Test; -plan 250; +plan 252; # L @@ -554,6 +554,11 @@ sub showkv($x) { # RT #117773 { - my $b = BagHash.new( (a=>"b") ); - ok $b.keys[0] ~~ ("a" => "b"), 'first key of BagHash is a Pair ("a" => "b")'; + my $b1 = BagHash.new( (a=>"b") ); + ok $b1.keys[0] ~~ ("a" => "b"), 'first key of BagHash is a Pair ("a" => "b")'; + my $b2 = BagHash.new( "a"=>"b" ); + ok $b2.keys[0] ~~ ("a" => "b"), 'again first key of BagHash is a Pair ("a" => "b")'; + my $b3 = BagHash.new( a=>"b" ); + ok $b3.elems == 0, + 'named argument is happily eaten by .new method'; }