File tree Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Original file line number Diff line number Diff line change 1
1
use v6 ;
2
2
use Test ;
3
3
4
- plan 3 ;
4
+ plan 6 ;
5
5
6
6
# Sanity check that the repl is working at all.
7
7
my $ cmd = $ * DISTRO . is-win
@@ -42,3 +42,40 @@ sub feed_repl_with ( @lines ) {
42
42
is feed_repl_with( @ input-lines ). lines , (4 , 4 ),
43
43
' can use native typed variable on subsequent lines (1)' ;
44
44
}
45
+
46
+ # rakudo todo "some indent styles don't parse right"
47
+ {
48
+ my @ input-lines = q :to /END /. split (" \n " );
49
+ if False {
50
+ say ":(";
51
+ }
52
+ else {
53
+ say ":)";
54
+ }
55
+ END
56
+ is feed_repl_with( @ input-lines ). lines , " :)" ,
57
+ " uncuddled else is parsed correctly" ;
58
+
59
+ @ input-lines = q :to /END /. split (" \n " );
60
+ if False
61
+ {
62
+ say ":(";
63
+ }
64
+ else
65
+ {
66
+ say ":)";
67
+ }
68
+ END
69
+ is feed_repl_with( @ input-lines ). lines , " :)" ,
70
+ " open brace on next line is parsed correctly" ;
71
+
72
+ @ input-lines = q :to /END /. split (" \n " );
73
+ if False {
74
+ say ":(";
75
+ } else {
76
+ say ":)";
77
+ }
78
+ END
79
+ is feed_repl_with( @ input-lines ). lines , " :)" ,
80
+ " cuddled else is parsed correctly" ;
81
+ }
You can’t perform that action at this time.
0 commit comments