Skip to content

Commit fe95a41

Browse files
committed
Add failure tests.
1 parent 3cff9ea commit fe95a41

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
test "expression sections":
2+
set {_var} to false
23
set {_runnable} to a new runnable:
3-
broadcast "HELLO THERE"
4+
set {_var} to true
5+
assert {_var} is false with "expression section ran too early!"
46
run {_runnable}
7+
assert {_var} is true with "expression section didn't run!"
8+
9+
test "expression sections that don't work":
10+
parse:
11+
set {_var} to true:
12+
broadcast "NO BAD"
13+
assert last parse logs is set with "section was allowed with no header"
14+
parse:
15+
set {_list::*} to a new runnable, a new runnable and a new runnable:
16+
broadcast "NO BAD"
17+
assert last parse logs is set with "section was allowed with multiple headers"

0 commit comments

Comments
 (0)