mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-18 13:49:59 +01:00
Add some tests with invalid trailing commas
This commit is contained in:
committed by
Bob Nystrom
parent
b20c9a1b38
commit
d7eed08774
@ -5,3 +5,8 @@ var list = [
|
||||
|
||||
IO.print(list[0]) // expect: a
|
||||
IO.print(list[1]) // expect: b
|
||||
|
||||
// Invalid syntax
|
||||
IO.print(new Fiber { Meta.eval("[,]") }.try()) // expect: Could not compile source code.
|
||||
IO.print(new Fiber { Meta.eval("[1,,]") }.try()) // expect: Could not compile source code.
|
||||
IO.print(new Fiber { Meta.eval("[1,,2]") }.try()) // expect: Could not compile source code.
|
||||
|
||||
Reference in New Issue
Block a user