[Prism] Add ForNode tests
This commit is contained in:
parent
5dfba84cff
commit
91fba0a3d2
@ -535,6 +535,15 @@ module Prism
|
|||||||
assert_prism_eval("a = 0; while a != 1; a = a + 1; end")
|
assert_prism_eval("a = 0; while a != 1; a = a + 1; end")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_ForNode
|
||||||
|
assert_prism_eval("for i in [1,2] do; i; end")
|
||||||
|
assert_prism_eval("for @i in [1,2] do; @i; end")
|
||||||
|
assert_prism_eval("for $i in [1,2] do; $i; end")
|
||||||
|
|
||||||
|
# TODO: multiple assignment in ForNode index
|
||||||
|
#assert_prism_eval("for i, j in {a: 'b'} do; i; j; end")
|
||||||
|
end
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# Throws #
|
# Throws #
|
||||||
############################################################################
|
############################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user