Files
wren/test/language/list/newlines.wren
T

25 lines
305 B
Plaintext
Raw Normal View History

2014-04-04 07:51:18 -07:00
// Allow after '[' and ',', and before ']'.
2013-12-20 12:42:11 -08:00
var list = [
2014-04-04 07:51:18 -07:00
"a",
"b"
2013-12-20 12:42:11 -08:00
]
2015-09-15 07:46:09 -07:00
System.print(list[0]) // expect: a
System.print(list[1]) // expect: b
2015-08-31 07:23:36 -07:00
// Newline after trailing comma.
list = ["c",
]
2015-09-15 07:46:09 -07:00
System.print(list[0]) // expect: c
2015-08-31 07:23:36 -07:00
// Newline in empty list.
list = [
]
2015-09-15 07:46:09 -07:00
System.print(list.count) // expect: 0