Permalink
Browse files

Trying to make this suitable for "make spectest" with Rakudo.

The skip tests work, but the first TODO test doesn't TODO.
Also, tests die part way through, but I can't figure out how to make part of a
test skip instead of all of it.


git-svn-id: http://svn.pugscode.org/pugs@24710 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 1424542 commit 3b37c07848e985a998af7b301752707c3bb7b6b4 Ovid committed Dec 31, 2008
Showing with 9 additions and 1 deletion.
  1. +9 −1 S09-autovivification/autovivification.t
@@ -8,16 +8,19 @@ plan 39;
{
my %hash;
%hash<a>;
+ #?pugs todo 'BUG [perl #61882]'
ok !%hash.exists('a'), 'just mentioning a hash value should not autovivify it';
}
+#?rakudo skip 'Error Msg: elements() not implemented in class Undef'
{
my %hash;
%hash<key>[42] = 17;
is %hash<key>[42], 17, "autovivification of a hash element to an arrayref worked";
}
+#?rakudo skip "Error Msg: Method 'postcircumfix:{ }' not found for invocant of class 'Failure'"
{
my %hash;
@@ -26,13 +29,15 @@ plan 39;
}
# Autovification by push, unshift, etc.
+#?rakudo skip "Error Msg: No applicable methods."
{
my $arrayref;
push $arrayref, 1,2,3;
is ~$arrayref, "1 2 3", "autovivification to an array by &push";
}
+#?rakudo skip "Error Msg: No applicable methods."
{
my $arrayref;
@@ -41,27 +46,30 @@ plan 39;
}
# Autovification by push, unshift, etc. of an array/hash element
+#?rakudo skip "Error Msg: No applicable methods."
{
my @array;
push @array[2], 1,2,3;
is ~@array, " 1 2 3", "autovivification of an array element to an array by &push";
}
+#?rakudo skip "Error Msg: No applicable methods."
{
my %hash;
push %hash<key>, 1,2,3;
is ~%hash, "key\t1 2 3\n", "autovivification of an hash element to an array by &push";
}
+
# Simple hash autovivification
{
my $hashref;
ok !$hashref.isa(Hash), "uninitialized variable is not a Hash (1)";
$hashref<key> = 23;
- ok $hashref.isa(Hash), "uninitialized variable was autovivified to a hash (1)";
is $hashref<key>, 23, "hash element assignment worked";
+ ok $hashref.isa(Hash), "uninitialized variable was autovivified to a hash (1)";
}
{

0 comments on commit 3b37c07

Please sign in to comment.