Permalink
Browse files

[t/spec] Correct and unfudge some tests.

git-svn-id: http://svn.pugscode.org/pugs@30265 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 74d6efa commit d28620529575b2a87b09d94056fd9f3233edde1c jnthn committed Apr 1, 2010
Showing with 7 additions and 7 deletions.
  1. +7 −7 S04-statements/do.t
View
14 S04-statements/do.t
@@ -5,25 +5,25 @@ use Test;
plan 24;
# L<S04/The do-once loop/"can't" put "statement modifier">
-#?rakudo 5 todo 'do {} while/until/if is valid but should not be'
+# Note in accordance with STD, conditionals are OK, loops are not.
eval_dies_ok 'my $i = 1; do { $i++ } while $i < 5;',
"'do' can't take the 'while' modifier";
eval_dies_ok 'my $i = 1; do { $i++ } until $i > 4;',
"'do' can't take the 'until' modifier";
-eval_dies_ok 'my $i = 1; do { $i++ } if $i;',
- "'do' can't take the 'if' modifier";
-
eval_dies_ok 'my $i; do { $i++ } for 1..3;',
"'do' can't take the 'for' modifier";
-eval_dies_ok 'my $i; do { $i++ } unless $i;',
- "'do' can't take the 'unless' modifier";
-
eval_dies_ok 'my $i; do { $i++ } given $i;',
"'do' can't take the 'given' modifier";
+eval_lives_ok 'my $i; do { $i++ } unless $i;',
+ "'do' can take the 'unless' modifier";
+
+eval_lives_ok 'my $i = 1; do { $i++ } if $i;',
+ "'do' can take the 'if' modifier";
+
# L<S04/The do-once loop/statement "prefixing with" do>
{
my $x;

0 comments on commit d286205

Please sign in to comment.