aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2025-07-18 16:13:02 +0800
committerLi Jin <dragon-fly@qq.com>2025-07-18 16:13:02 +0800
commita092802f958780282ae34f3cccc3cc8ce2263ac9 (patch)
tree1474dd929308ac8f99fe6bb22ac6e3eb733b8f01 /spec/outputs
parent9d3d8ef2be15dfbf279de71241ff747a568e2c49 (diff)
downloadyuescript-0.29.1.tar.gz
yuescript-0.29.1.tar.bz2
yuescript-0.29.1.zip
Fixes.v0.29.1
Diffstat (limited to 'spec/outputs')
-rw-r--r--spec/outputs/codes_from_doc.lua26
-rw-r--r--spec/outputs/codes_from_doc_zh.lua26
2 files changed, 52 insertions, 0 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua
index f1e46d9..b7d1236 100644
--- a/spec/outputs/codes_from_doc.lua
+++ b/spec/outputs/codes_from_doc.lua
@@ -109,6 +109,12 @@ end
109print("yuescript") 109print("yuescript")
110print(3) 110print(3)
111print("Valid enum type:", "Static") 111print("Valid enum type:", "Static")
112do
113 print(123, "hello")
114end
115do
116 print(123, "hello")
117end
112if tb ~= nil then 118if tb ~= nil then
113 tb:func() 119 tb:func()
114end 120end
@@ -816,6 +822,13 @@ print("I am " .. tostring(math.random() * 100) .. "% sure.")
816local integer = 1000000 822local integer = 1000000
817local hex = 0xEFBBBF 823local hex = 0xEFBBBF
818local binary = 19 824local binary = 19
825local str = "key: value\nlist:\n - item1\n - " .. tostring(expr)
826local fn
827fn = function()
828 local str = "foo:\n bar: baz"
829 return str
830end
831local str = "path: \"C:\\Program Files\\App\"\nnote: 'He said: \"" .. tostring(Hello) .. "!\"'"
819local my_function 832local my_function
820my_function = function() end 833my_function = function() end
821my_function() 834my_function()
@@ -2505,6 +2518,12 @@ end
2505print("yuescript") 2518print("yuescript")
2506print(3) 2519print(3)
2507print("Valid enum type:", "Static") 2520print("Valid enum type:", "Static")
2521do
2522 print(123, "hello")
2523end
2524do
2525 print(123, "hello")
2526end
2508if tb ~= nil then 2527if tb ~= nil then
2509 tb:func() 2528 tb:func()
2510end 2529end
@@ -3212,6 +3231,13 @@ print("I am " .. tostring(math.random() * 100) .. "% sure.")
3212local integer = 1000000 3231local integer = 1000000
3213local hex = 0xEFBBBF 3232local hex = 0xEFBBBF
3214local binary = 19 3233local binary = 19
3234local str = "key: value\nlist:\n - item1\n - " .. tostring(expr)
3235local fn
3236fn = function()
3237 local str = "foo:\n bar: baz"
3238 return str
3239end
3240local str = "path: \"C:\\Program Files\\App\"\nnote: 'He said: \"" .. tostring(Hello) .. "!\"'"
3215local my_function 3241local my_function
3216my_function = function() end 3242my_function = function() end
3217my_function() 3243my_function()
diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua
index 4689232..b54d6d7 100644
--- a/spec/outputs/codes_from_doc_zh.lua
+++ b/spec/outputs/codes_from_doc_zh.lua
@@ -109,6 +109,12 @@ end
109print("yuescript") 109print("yuescript")
110print(3) 110print(3)
111print("有效的枚举类型:", "Static") 111print("有效的枚举类型:", "Static")
112do
113 print(123, "hello")
114end
115do
116 print(123, "hello")
117end
112if tb ~= nil then 118if tb ~= nil then
113 tb:func() 119 tb:func()
114end 120end
@@ -816,6 +822,13 @@ print("我有" .. tostring(math.random() * 100) .. "%的把握。")
816local integer = 1000000 822local integer = 1000000
817local hex = 0xEFBBBF 823local hex = 0xEFBBBF
818local binary = 19 824local binary = 19
825local str = "key: value\nlist:\n - item1\n - " .. tostring(expr)
826local fn
827fn = function()
828 local str = "foo:\n bar: baz"
829 return str
830end
831local str = "path: \"C:\\Program Files\\App\"\nnote: 'He said: \"" .. tostring(Hello) .. "!\"'"
819local my_function 832local my_function
820my_function = function() end 833my_function = function() end
821my_function() 834my_function()
@@ -2499,6 +2512,12 @@ end
2499print("yuescript") 2512print("yuescript")
2500print(3) 2513print(3)
2501print("有效的枚举类型:", "Static") 2514print("有效的枚举类型:", "Static")
2515do
2516 print(123, "hello")
2517end
2518do
2519 print(123, "hello")
2520end
2502if tb ~= nil then 2521if tb ~= nil then
2503 tb:func() 2522 tb:func()
2504end 2523end
@@ -3206,6 +3225,13 @@ print("我有" .. tostring(math.random() * 100) .. "%的把握。")
3206local integer = 1000000 3225local integer = 1000000
3207local hex = 0xEFBBBF 3226local hex = 0xEFBBBF
3208local binary = 19 3227local binary = 19
3228local str = "key: value\nlist:\n - item1\n - " .. tostring(expr)
3229local fn
3230fn = function()
3231 local str = "foo:\n bar: baz"
3232 return str
3233end
3234local str = "path: \"C:\\Program Files\\App\"\nnote: 'He said: \"" .. tostring(Hello) .. "!\"'"
3209local my_function 3235local my_function
3210my_function = function() end 3236my_function = function() end
3211my_function() 3237my_function()