aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/codes_from_doc_zh.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--spec/outputs/codes_from_doc_zh.lua28
1 files changed, 26 insertions, 2 deletions
diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua
index 52204b7..399f8c1 100644
--- a/spec/outputs/codes_from_doc_zh.lua
+++ b/spec/outputs/codes_from_doc_zh.lua
@@ -339,6 +339,14 @@ func({
339 2, 339 2,
340 3 340 3
341}) 341})
342local f
343f = function()
344 return {
345 1,
346 2,
347 3
348 }
349end
342local tb = { 350local tb = {
343 name = "abc", 351 name = "abc",
344 values = { 352 values = {
@@ -1220,7 +1228,7 @@ if "Robert" == name then
1220elseif "Dan" == name or "Daniel" == name then 1228elseif "Dan" == name or "Daniel" == name then
1221 print("你的名字是Dan") 1229 print("你的名字是Dan")
1222else 1230else
1223 print("我不知道你的名字") 1231 print("我不认识,你的名字" .. tostring(name))
1224end 1232end
1225local b = 1 1233local b = 1
1226local next_number 1234local next_number
@@ -2133,6 +2141,10 @@ do
2133 _with_1["key-name"] = value 2141 _with_1["key-name"] = value
2134end 2142end
2135_with_0[#_with_0 + 1] = "abc" 2143_with_0[#_with_0 + 1] = "abc"
2144local _with_0 = obj
2145if _with_0 ~= nil then
2146 print(obj.name)
2147end
2136do 2148do
2137 local var = "hello" 2149 local var = "hello"
2138 print(var) 2150 print(var)
@@ -2542,6 +2554,14 @@ func({
2542 2, 2554 2,
2543 3 2555 3
2544}) 2556})
2557local f
2558f = function()
2559 return {
2560 1,
2561 2,
2562 3
2563 }
2564end
2545local tb = { 2565local tb = {
2546 name = "abc", 2566 name = "abc",
2547 values = { 2567 values = {
@@ -3422,7 +3442,7 @@ if "Robert" == name then
3422elseif "Dan" == name or "Daniel" == name then 3442elseif "Dan" == name or "Daniel" == name then
3423 print("你的名字是Dan") 3443 print("你的名字是Dan")
3424else 3444else
3425 print("我不知道你的名字") 3445 print("我不认识,你的名字" .. tostring(name))
3426end 3446end
3427local b = 1 3447local b = 1
3428local next_number 3448local next_number
@@ -4335,6 +4355,10 @@ do
4335 _with_1["key-name"] = value 4355 _with_1["key-name"] = value
4336end 4356end
4337_with_0[#_with_0 + 1] = "abc" 4357_with_0[#_with_0 + 1] = "abc"
4358local _with_0 = obj
4359if _with_0 ~= nil then
4360 print(obj.name)
4361end
4338do 4362do
4339 local var = "hello" 4363 local var = "hello"
4340 print(var) 4364 print(var)