Files
wren/test/function/syntax.wren
Bob Nystrom b979272305 Clean up text handling a bit:
- Rename IO.write -> IO.print.
- Make IO.write not print a newline.
- Support \u Unicode escapes in strings.
2014-01-05 12:27:12 -08:00

32 lines
418 B
Plaintext

// Single expression body.
(fn IO.print("ok")).call // expect: ok
// TODO: Precedence of fn body.
// Curly body.
fn {
IO.print("ok") // expect: ok
}.call
// No trailing newline.
fn {
IO.print("ok") }.call // expect: ok
// Multiple expressions.
fn {
IO.print("1") // expect: 1
IO.print("2") // expect: 2
}.call
// Extra newlines.
fn {
IO.print("1") // expect: 1
IO.print("2") // expect: 2
}.call