Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec/*.t] :todo whackage

git-svn-id: http://svn.pugscode.org/pugs@19876 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit a20c69c22383feea5ca74736fc02bffa55dd30ed 1 parent d44ad3a
lwall authored
View
3  S02-whitespace_and_comments/unspace.t
@@ -37,7 +37,8 @@ eval "
@array»\ .++;
@array\ .»\ .++;
";
-is( ~@array, "7 8 9", 'unspace with postfix hyperops', :todo);
+#?pugs todo 'unimpl'
+is( ~@array, "7 8 9", 'unspace with postfix hyperops');
#Test the "unspace" and unspace syntax
View
4 S29-container/roundrobin.t
@@ -40,7 +40,7 @@ flunk('roundrobin :finite');
=begin lazy_roundrobin
-ok(roundrobin(:finite, 1; 1..2; 1..3) eqv (1), 'roundrobin :shortest',
- :todo<feature>);
+#?pugs todo 'feature'
+ok(roundrobin(:finite, 1; 1..2; 1..3) eqv (1), 'roundrobin :shortest');
=end lazy_roundrobin
View
12 S29-container/zip.t
@@ -52,9 +52,9 @@ plan 9;
my @z; @z = zip(zip(@a; @b); @c);
my @x; @x = ((@a Z @b) Z @c);
- is(~@z, ~@e, "zip of zipped arrays with other array", :todo<feature>,
- :depends<Seq>);
- is(~@x, ~@e, "also as Z", :todo<feature>, :depends<Seq>);
+#?pugs 2 todo 'needs Seq'
+ is(~@z, ~@e, "zip of zipped arrays with other array");
+ is(~@x, ~@e, "also as Z");
};
{
@@ -72,6 +72,8 @@ plan 9;
(@a Z @b) = (1, 2, 3, 4);
# XXX - The arrays below are most likely Seq's
- is(@a, [1, 3], "first half of two zipped arrays as lvalues", :todo);
- is(@b, [2, 4], "second half of the lvalue zip", :todo);
+#?pugs todo 'unimpl'
+ is(@a, [1, 3], "first half of two zipped arrays as lvalues");
+#?pugs todo 'unimpl'
+ is(@b, [2, 4], "second half of the lvalue zip");
}
View
15 S29-hash/slice.t
@@ -30,18 +30,13 @@ plan 25;
is(%hash{@slice[0,1]}, (4,6), "slice from array slice, part 2");
}
-=begin pod
-# unspecced
-
-# Behaviour assumed to be the same as Perl 5
-{ my %hash = (:a(1), :b(2), :c(3), :d(4));
+#?pugs todo 'feature'
+{
+ my %hash = :a(1), :b(2), :c(3), :d(4);
my @slice := %hash<b c>;
- is ~(@slice = <A B C D>), "A B",
- "assigning a slice too many items yields a correct return value",
- :todo<bug>;
+ is ~((@slice,*) = <A B C D>), "A B",
+ "assigning a slice too many items yields a correct return value";
}
-=end pod
-
# Slices on hash literals
{ is ~({:a(1), :b(2), :c(3), :d(4)}<b c>), "2 3", "slice on hashref literal";
View
32 S29-list/classify.t
@@ -5,24 +5,30 @@ use Test;
plan 11;
-my @list = (1, 2, 3, 4);
-my (@even,@odd);
-ok(eval(q"(:@even, :@odd) := classify { $_ % 2 ?? 'odd' !! 'even' } 1,2,3,4; "), :todo<feature> );
-is_deeply(@even, [2,4], "got expected evens", :todo<feature>);
-is_deeply(@even, [1,3], "got expected odds", :todo<feature>);
-
-my %by_five;
-ok(eval(q" %by_five = classify { $_ * 5 } 1,2,3,4 "), :todo<feature>);
+#?pugs todo 'feature'
+{
+ my @list = (1, 2, 3, 4);
+ my (@even,@odd);
+ ok(eval(q"(:@even, :@odd) := classify { $_ % 2 ?? 'odd' !! 'even' } 1,2,3,4; ") );
+ is_deeply(@even, [2,4], "got expected evens");
+ is_deeply(@even, [1,3], "got expected odds");
+}
-is( %by_five{5}, 1, :todo<feature>);
-is( %by_five{10}, 2, :todo<feature>);
-is( %by_five{15}, 3, :todo<feature>);
-is( %by_five{20}, 4, :todo<feature> );
+#?pugs todo 'feature'
+{
+ my %by_five;
+ ok(eval(q" %by_five = classify { $_ * 5 } 1,2,3,4 "));
+ is( %by_five{5}, 1);
+ is( %by_five{10}, 2);
+ is( %by_five{15}, 3);
+ is( %by_five{20}, 4);
+}
# .classify shouldn't work on non-arrays
{
dies_ok { 42.classify:{ $_ } }, "method form of classify should not work on numbers";
dies_ok { "str".classify:{ $_ } }, "method form of classify should not work on strings";
- is eval(q<<< ~(42,).classify:{ 1 } >>>), "42", "method form of classify should work on arrays", :todo<feature>;
+#?pugs todo 'feature'
+ is eval(q<<< ~(42,).classify:{ 1 } >>>), "42", "method form of classify should work on arrays";
}
View
5 S29-list/grep.t
@@ -55,8 +55,9 @@ my @list = (1 .. 10);
# .grep shouldn't work on non-arrays
{
- dies_ok { 42.grep:{ $_ } }, "method form of grep should not work on numbers", :todo<bug>;
- dies_ok { "str".grep:{ $_ } }, "method form of grep should not work on strings", :todo<bug>;
+ #?pugs 2 todo 'bug'
+ dies_ok { 42.grep:{ $_ } }, "method form of grep should not work on numbers";
+ dies_ok { "str".grep:{ $_ } }, "method form of grep should not work on strings";
is ~(42,).grep:{ 1 }, "42", "method form of grep should work on arrays";
}
View
3  S29-list/join.t
@@ -107,4 +107,5 @@ is(("hi",).join("!"), "hi", "&join works with one-element lists (3)");
dies_ok({ join() }, 'join() must have arguments');
# Similar as with .kv: (42).kv should die, but (42,).kv should work.
-dies_ok({ "hi".join("!") }, "join() should not work on strings", :todo<bug>);
+#?pugs todo 'bug'
+dies_ok({ "hi".join("!") }, "join() should not work on strings");
View
8 S29-list/map.t
@@ -107,8 +107,9 @@ my @list = (1 .. 5);
# .map shouldn't work on non-arrays
{
- dies_ok { 42.map:{ $_ } }, "method form of map should not work on numbers", :todo<bug>;
- dies_ok { "str".map:{ $_ } }, "method form of map should not work on strings", :todo<bug>;
+ #?pugs 2 todo 'bug'
+ dies_ok { 42.map:{ $_ } }, "method form of map should not work on numbers";
+ dies_ok { "str".map:{ $_ } }, "method form of map should not work on strings";
is ~(42,).map:{ $_ }, "42", "method form of map should work on arrays";
}
@@ -138,7 +139,8 @@ should be equivalent to
is(+@b,3, "should be 3 elemens");
my @c = map { {"v"=>$_, "d" => $_*2} }, @a;
- is(+@c,3, "should be 3 elemens without the hash keyword as well", :todo);
+#?pugs todo 'unimpl'
+ is(+@c,3, "should be 3 elemens without the hash keyword as well");
}
#
View
3  S29-list/map_empty_list.t
@@ -27,12 +27,13 @@ plan 7;
is +@result, 4, "map works with the map body returning an empty arrayref";
}
+#?pugs todo 'bug'
{
my @array = <a b c d>;
my $empty = [];
my @result = map { $empty }, @array;
- is +@result, 4, "map works with the map body returning an empty arrayref variable", :todo<bug>;
+ is +@result, 4, "map works with the map body returning an empty arrayref variable";
}
{
View
5 S29-list/minmax.t
@@ -56,8 +56,9 @@ is max({ abs $^a <=> abs $^b }, @array), -9,
"subroutine form of max taking a comparision block works";
# Error cases:
-dies_ok { 42.max }, ".max should not work on scalars", :todo<bug>;
-dies_ok { 42.min }, ".min should not work on scalars", :todo<bug>;
+#?pugs 2 todo 'bug'
+dies_ok { 42.max }, ".max should not work on scalars";
+dies_ok { 42.min }, ".min should not work on scalars";
is (42,).max, 42, ".max should work on one-elem arrays";
is (42,).max, 42, ".max should work on one-elem arrays";
View
5 S29-list/reduce.t
@@ -34,8 +34,9 @@ plan 11;
# .reduce shouldn't work on non-arrays
{
- dies_ok { 42.reduce:{ $^a + $^b } }, "method form of reduce should not work on numbers", :todo<bug>;
- dies_ok { "str".reduce:{ $^a + $^b } }, "method form of reduce should not work on strings", :todo<bug>;
+#?pugs 2 todo 'bug'
+ dies_ok { 42.reduce:{ $^a + $^b } }, "method form of reduce should not work on numbers";
+ dies_ok { "str".reduce:{ $^a + $^b } }, "method form of reduce should not work on strings";
is (42,).reduce:{ $^a + $^b }, 42, "method form of reduce should work on arrays";
}
View
5 S29-list/sort.t
@@ -150,7 +150,8 @@ plan 21;
# .sort shouldn't work on non-arrays
{
- dies_ok { 42.sort:{ 0 } }, "method form of sort should not work on numbers", :todo<bug>;
- dies_ok { "str".sort:{ 0 } }, "method form of sort should not work on strings", :todo<bug>;
+#?pugs 2 todo 'bug'
+ dies_ok { 42.sort:{ 0 } }, "method form of sort should not work on numbers";
+ dies_ok { "str".sort:{ 0 } }, "method form of sort should not work on strings";
is ~(42,).sort:{ 0 }, "42", "method form of sort should work on arrays";
}
View
6 S29-list/uniq.t
@@ -32,12 +32,12 @@ See the thread "[S29] uniq" on p6l, too.
is ~uniq({ lc $^a eq lc $^b }, @array), "a b c d", "subroutine form of uniq with own comparator works";
# Semantics w/ junctions
- # is eval('~@array.uniq:{ lc $^a eq lc $^b }.values.sort'),
- # "A b c d a b c d", :todo;
+ # is eval('~@array.uniq:{ lc $^a eq lc $^b }.values.sort'), "A b c d a b c d";
}
# Error cases
{
- dies_ok { 42.uniq }, ".uniq should not work on scalars", :todo<bug>;
+ #?pugs todo 'bug'
+ dies_ok { 42.uniq }, ".uniq should not work on scalars";
is (42,).uniq, 42, ".uniq should work on one-elem arrays";
}
View
35 S29-scalar/undef.t
@@ -83,10 +83,12 @@ ok(!defined(undef), "undef is not defined");
ok(defined(%hash), "aggregate hash defined");
undefine(@ary);
- ok(!defined(@ary), "undefine array",:todo<bug>);
+#?pugs todo 'bug'
+ ok(!defined(@ary), "undefine array");
undefine(%hash);
- ok(!defined(%hash), "undefine hash",:todo<bug>);
+#?pugs todo 'bug'
+ ok(!defined(%hash), "undefine hash");
@ary = (1);
ok(defined(@ary), "define array again");
@@ -98,10 +100,13 @@ ok(!defined(undef), "undef is not defined");
sub a_sub { "møøse" }
ok(defined(&a_sub), "defined sub");
- ok(eval('defined(%«$?PACKAGE\::»<&a_sub>)'), "defined sub (symbol table)", :todo<parsefail>);
+#?pugs todo 'parsefail'
+ ok(eval('defined(%«$?PACKAGE\::»<&a_sub>)'), "defined sub (symbol table)");
- ok(eval('!defined(&a_subwoofer)'), "undefined sub",:todo<feature>);
- ok(eval('!defined(%«$?PACKAGE\::»<&a_subwoofer>)'), "undefined sub (symbol table)", :todo<feature>);
+#?pugs todo 'feature'
+ ok(eval('!defined(&a_subwoofer)'), "undefined sub");
+#?pugs todo 'feature'
+ ok(eval('!defined(%«$?PACKAGE\::»<&a_subwoofer>)'), "undefined sub (symbol table)");
}
# TODO: find a read-only value to try and assign to, since we don't
@@ -222,12 +227,14 @@ else {
# I want symbolic lookups because I need the rx names for test results.
eval '"1" ~~ %MY::{$_}';
- ok(defined($num), '{$_}: successful hypothetical', :todo);
+#?pugs todo 'unimpl'
+ ok(defined($num), '{$_}: successful hypothetical');
ok(!defined($alpha), '{$_}: failed hypothetical');
eval '"A" ~~ %MY::{$_}';
ok(!defined($num), '{$_}: failed hypothetical (2nd go)');
- ok(defined($alpha), '{$_}: successful hypothetical (2nd go)', :todo);
+#?pugs todo 'unimpl'
+ ok(defined($alpha), '{$_}: successful hypothetical (2nd go)');
}
}
@@ -238,12 +245,12 @@ if ! eval '"a" ~~ /a/' {
else {
# - binding to hash keys only would leave values undef
eval '"a=b\nc=d\n" ~~ / $<matches> := [ (\w) = \N+ ]* /';
- ok(eval('$<matches> ~~ all(<a b>)'), "match keys exist", :todo);
-
- #ok(!defined($<matches><a>) && !defined($<matches><b>), "match values don't", :todo);
- ok(0 , "match values don't", :todo);
-}
+#?pugs todo 'unimpl'
+ ok(eval('$<matches> ~~ all(<a b>)'), "match keys exist");
+ #ok(!defined($<matches><a>) && !defined($<matches><b>), "match values don't");
+#?pugs todo 'unimpl'
+ ok(0 , "match values don't")
{
# - $0, $1 etc. should all be undef after a failed match
# (except for special circumstances)
@@ -321,6 +328,6 @@ is((undef) * (undef), 0, 'undef * undef');
# L<http://colabti.de/irclogger/irclogger_log/perl6?date=2006-09-12,Tue&sel=145#l186>
# See log above. From IRC, TimToady says that both of these
# should be false. (At time of writing, @(undef,) is true.)
-is ?(@(undef,)), Bool::False, '?(@(undef,)) is false', :todo<feature>,
- :depends<@() imposing context and not [] constructor>;
+#?pugs todo 'feature', :depends<@() imposing context and not [] constructor>;
+is ?(@(undef,)), Bool::False, '?(@(undef,)) is false';
is ?(list(undef,)), Bool::False, '?(@(undef,)) is false';
Please sign in to comment.
Something went wrong with that request. Please try again.