Skip to content

Commit

Permalink
Add a few moreinput related tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
peschwa committed Apr 1, 2015
1 parent f65ba97 commit bc7e480
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion t/02-rakudo/repl.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 3;
plan 6;

# Sanity check that the repl is working at all.
my $cmd = $*DISTRO.is-win
Expand Down Expand Up @@ -42,3 +42,40 @@ sub feed_repl_with ( @lines ) {
is feed_repl_with( @input-lines ).lines, (4, 4),
'can use native typed variable on subsequent lines (1)';
}

#rakudo todo "some indent styles don't parse right"
{
my @input-lines = q:to/END/.split("\n");
if False {
say ":(";
}
else {
say ":)";
}
END
is feed_repl_with( @input-lines ).lines, ":)",
"uncuddled else is parsed correctly";

@input-lines = q:to/END/.split("\n");
if False
{
say ":(";
}
else
{
say ":)";
}
END
is feed_repl_with( @input-lines ).lines, ":)",
"open brace on next line is parsed correctly";

@input-lines = q:to/END/.split("\n");
if False {
say ":(";
} else {
say ":)";
}
END
is feed_repl_with( @input-lines ).lines, ":)",
"cuddled else is parsed correctly";
}

0 comments on commit bc7e480

Please sign in to comment.