diff options
author | Li Jin <dragon-fly@qq.com> | 2021-10-12 10:04:44 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-10-12 10:04:44 +0800 |
commit | 60a979e224f26117f5be82bfca757a2483cef0fd (patch) | |
tree | 7c6af44f6dcada1f23979b820ba830251997b161 /spec/outputs/string.lua | |
parent | a19b242cbaf53721b20a3163dd06f43e9ef2b487 (diff) | |
download | yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.gz yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.bz2 yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.zip |
fix test.
Diffstat (limited to 'spec/outputs/string.lua')
-rw-r--r-- | spec/outputs/string.lua | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/spec/outputs/string.lua b/spec/outputs/string.lua new file mode 100644 index 0000000..84b6700 --- /dev/null +++ b/spec/outputs/string.lua | |||
@@ -0,0 +1,42 @@ | |||
1 | local hi = "hello" | ||
2 | local hello = "what the heckyes" | ||
3 | print(hi) | ||
4 | local umm = 'umm' | ||
5 | local here, another = "yeah", 'world' | ||
6 | local aye = "YU'M" | ||
7 | you('"hmmm" I said') | ||
8 | print(aye, you) | ||
9 | another = [[ hello world ]] | ||
10 | local hi_there = [[ hi there | ||
11 | ]] | ||
12 | local well = [==[ "helo" ]==] | ||
13 | local hola = [===[ eat noots]===] | ||
14 | local mm = [[well trhere]] | ||
15 | local txt = [[ | ||
16 | |||
17 | nil | ||
18 | Fail to compile | ||
19 | ]] | ||
20 | local oo = "" | ||
21 | local x = "\\" | ||
22 | x = "a\\b" | ||
23 | x = "\\\n" | ||
24 | x = "\"" | ||
25 | local a = "hello " .. tostring(hello) .. " hello" | ||
26 | local b = tostring(hello) .. " hello" | ||
27 | local c = "hello " .. tostring(5 + 1) | ||
28 | local d = tostring(hello(world)) | ||
29 | local e = tostring(1) .. " " .. tostring(2) .. " " .. tostring(3) | ||
30 | local f = [[hello #{world} world]] | ||
31 | a = 'hello #{hello} hello' | ||
32 | b = '#{hello} hello' | ||
33 | c = 'hello #{hello}' | ||
34 | local _ = "hello"; | ||
35 | ("hello"):format(1); | ||
36 | ("hello"):format(1, 2, 3); | ||
37 | ("hello"):format(1, 2, 3)(1, 2, 3); | ||
38 | ("hello"):world(); | ||
39 | ("hello"):format().hello(1, 2, 3); | ||
40 | ("hello"):format(1, 2, 3) | ||
41 | something("hello"):world() | ||
42 | return something(("hello"):world()) | ||