mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-18 13:49:59 +01:00
Fix a bunch of test TODOs.
- Added a bunch of tests. - Removed some TODOs for stuff that's already done. - Made list literals handle newlines better.
This commit is contained in:
@ -1,7 +1,3 @@
|
||||
io.write([].count) // expect: 0
|
||||
io.write([1].count) // expect: 1
|
||||
io.write([1, 2, 3, 4].count) // expect: 4
|
||||
|
||||
// TODO: Literal syntax, including newline handling.
|
||||
// TODO: Unterminated list literal.
|
||||
// TODO: Subscript operator.
|
||||
|
||||
2
test/list/eof_after_comma.wren
Normal file
2
test/list/eof_after_comma.wren
Normal file
@ -0,0 +1,2 @@
|
||||
[1, 2,
|
||||
// expect error
|
||||
2
test/list/eof_after_element.wren
Normal file
2
test/list/eof_after_element.wren
Normal file
@ -0,0 +1,2 @@
|
||||
[1, 2
|
||||
// expect error
|
||||
14
test/list/newlines.wren
Normal file
14
test/list/newlines.wren
Normal file
@ -0,0 +1,14 @@
|
||||
// Allow newlines in most places.
|
||||
var list = [
|
||||
|
||||
"a"
|
||||
, "b",
|
||||
|
||||
"c", "d"
|
||||
|
||||
]
|
||||
|
||||
io.write(list[0]) // expect: a
|
||||
io.write(list[1]) // expect: b
|
||||
io.write(list[2]) // expect: c
|
||||
io.write(list[3]) // expect: d
|
||||
Reference in New Issue
Block a user