forked from Mirror/wren
Reorganize tests and benchmark scripts.
Mainly to get rid of one top level directory. But this will also be useful when there are tests of the embedding API.
This commit is contained in:
7
test/language/string/escapes.wren
Normal file
7
test/language/string/escapes.wren
Normal file
@ -0,0 +1,7 @@
|
||||
// Escape characters.
|
||||
IO.print("\"") // expect: "
|
||||
IO.print("\\") // expect: \
|
||||
IO.print("(\n)") // expect: (
|
||||
// expect: )
|
||||
|
||||
// TODO: Non-printing escapes like \t.
|
||||
2
test/language/string/incomplete_unicode_escape.wren
Normal file
2
test/language/string/incomplete_unicode_escape.wren
Normal file
@ -0,0 +1,2 @@
|
||||
// expect error line 2
|
||||
"\u00"
|
||||
@ -0,0 +1,2 @@
|
||||
// expect error line 2
|
||||
"\u004
|
||||
2
test/language/string/invalid_escape.wren
Normal file
2
test/language/string/invalid_escape.wren
Normal file
@ -0,0 +1,2 @@
|
||||
// expect error line 2
|
||||
"not a \m real escape"
|
||||
2
test/language/string/invalid_unicode_escape.wren
Normal file
2
test/language/string/invalid_unicode_escape.wren
Normal file
@ -0,0 +1,2 @@
|
||||
// expect error line 2
|
||||
"\u00no"
|
||||
5
test/language/string/literals.wren
Normal file
5
test/language/string/literals.wren
Normal file
@ -0,0 +1,5 @@
|
||||
IO.print("".count) // expect: 0
|
||||
IO.print("a string") // expect: a string
|
||||
|
||||
// Non-ASCII.
|
||||
IO.print("A~¶Þॐஃ") // expect: A~¶Þॐஃ
|
||||
17
test/language/string/unicode_escapes.wren
Normal file
17
test/language/string/unicode_escapes.wren
Normal file
@ -0,0 +1,17 @@
|
||||
// One byte UTF-8 Sequences.
|
||||
IO.print("\u0041") // expect: A
|
||||
IO.print("\u007e") // expect: ~
|
||||
|
||||
// Two byte sequences.
|
||||
IO.print("\u00b6") // expect: ¶
|
||||
IO.print("\u00de") // expect: Þ
|
||||
|
||||
// Three byte sequences.
|
||||
IO.print("\u0950") // expect: ॐ
|
||||
IO.print("\u0b83") // expect: ஃ
|
||||
|
||||
// Capitalized hex.
|
||||
IO.print("\u00B6") // expect: ¶
|
||||
IO.print("\u00DE") // expect: Þ
|
||||
|
||||
// TODO: Syntax for Unicode escapes > 0xffff?
|
||||
2
test/language/string/unterminated.wren
Normal file
2
test/language/string/unterminated.wren
Normal file
@ -0,0 +1,2 @@
|
||||
// expect error line 2
|
||||
"this string has no close quote
|
||||
Reference in New Issue
Block a user