diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/outputs/codes_from_doc.lua | 26 | ||||
| -rw-r--r-- | spec/outputs/codes_from_doc_zh.lua | 26 |
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 | |||
| 109 | print("yuescript") | 109 | print("yuescript") |
| 110 | print(3) | 110 | print(3) |
| 111 | print("Valid enum type:", "Static") | 111 | print("Valid enum type:", "Static") |
| 112 | do | ||
| 113 | print(123, "hello") | ||
| 114 | end | ||
| 115 | do | ||
| 116 | print(123, "hello") | ||
| 117 | end | ||
| 112 | if tb ~= nil then | 118 | if tb ~= nil then |
| 113 | tb:func() | 119 | tb:func() |
| 114 | end | 120 | end |
| @@ -816,6 +822,13 @@ print("I am " .. tostring(math.random() * 100) .. "% sure.") | |||
| 816 | local integer = 1000000 | 822 | local integer = 1000000 |
| 817 | local hex = 0xEFBBBF | 823 | local hex = 0xEFBBBF |
| 818 | local binary = 19 | 824 | local binary = 19 |
| 825 | local str = "key: value\nlist:\n - item1\n - " .. tostring(expr) | ||
| 826 | local fn | ||
| 827 | fn = function() | ||
| 828 | local str = "foo:\n bar: baz" | ||
| 829 | return str | ||
| 830 | end | ||
| 831 | local str = "path: \"C:\\Program Files\\App\"\nnote: 'He said: \"" .. tostring(Hello) .. "!\"'" | ||
| 819 | local my_function | 832 | local my_function |
| 820 | my_function = function() end | 833 | my_function = function() end |
| 821 | my_function() | 834 | my_function() |
| @@ -2505,6 +2518,12 @@ end | |||
| 2505 | print("yuescript") | 2518 | print("yuescript") |
| 2506 | print(3) | 2519 | print(3) |
| 2507 | print("Valid enum type:", "Static") | 2520 | print("Valid enum type:", "Static") |
| 2521 | do | ||
| 2522 | print(123, "hello") | ||
| 2523 | end | ||
| 2524 | do | ||
| 2525 | print(123, "hello") | ||
| 2526 | end | ||
| 2508 | if tb ~= nil then | 2527 | if tb ~= nil then |
| 2509 | tb:func() | 2528 | tb:func() |
| 2510 | end | 2529 | end |
| @@ -3212,6 +3231,13 @@ print("I am " .. tostring(math.random() * 100) .. "% sure.") | |||
| 3212 | local integer = 1000000 | 3231 | local integer = 1000000 |
| 3213 | local hex = 0xEFBBBF | 3232 | local hex = 0xEFBBBF |
| 3214 | local binary = 19 | 3233 | local binary = 19 |
| 3234 | local str = "key: value\nlist:\n - item1\n - " .. tostring(expr) | ||
| 3235 | local fn | ||
| 3236 | fn = function() | ||
| 3237 | local str = "foo:\n bar: baz" | ||
| 3238 | return str | ||
| 3239 | end | ||
| 3240 | local str = "path: \"C:\\Program Files\\App\"\nnote: 'He said: \"" .. tostring(Hello) .. "!\"'" | ||
| 3215 | local my_function | 3241 | local my_function |
| 3216 | my_function = function() end | 3242 | my_function = function() end |
| 3217 | my_function() | 3243 | my_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 | |||
| 109 | print("yuescript") | 109 | print("yuescript") |
| 110 | print(3) | 110 | print(3) |
| 111 | print("有效的枚举类型:", "Static") | 111 | print("有效的枚举类型:", "Static") |
| 112 | do | ||
| 113 | print(123, "hello") | ||
| 114 | end | ||
| 115 | do | ||
| 116 | print(123, "hello") | ||
| 117 | end | ||
| 112 | if tb ~= nil then | 118 | if tb ~= nil then |
| 113 | tb:func() | 119 | tb:func() |
| 114 | end | 120 | end |
| @@ -816,6 +822,13 @@ print("我有" .. tostring(math.random() * 100) .. "%的把握。") | |||
| 816 | local integer = 1000000 | 822 | local integer = 1000000 |
| 817 | local hex = 0xEFBBBF | 823 | local hex = 0xEFBBBF |
| 818 | local binary = 19 | 824 | local binary = 19 |
| 825 | local str = "key: value\nlist:\n - item1\n - " .. tostring(expr) | ||
| 826 | local fn | ||
| 827 | fn = function() | ||
| 828 | local str = "foo:\n bar: baz" | ||
| 829 | return str | ||
| 830 | end | ||
| 831 | local str = "path: \"C:\\Program Files\\App\"\nnote: 'He said: \"" .. tostring(Hello) .. "!\"'" | ||
| 819 | local my_function | 832 | local my_function |
| 820 | my_function = function() end | 833 | my_function = function() end |
| 821 | my_function() | 834 | my_function() |
| @@ -2499,6 +2512,12 @@ end | |||
| 2499 | print("yuescript") | 2512 | print("yuescript") |
| 2500 | print(3) | 2513 | print(3) |
| 2501 | print("有效的枚举类型:", "Static") | 2514 | print("有效的枚举类型:", "Static") |
| 2515 | do | ||
| 2516 | print(123, "hello") | ||
| 2517 | end | ||
| 2518 | do | ||
| 2519 | print(123, "hello") | ||
| 2520 | end | ||
| 2502 | if tb ~= nil then | 2521 | if tb ~= nil then |
| 2503 | tb:func() | 2522 | tb:func() |
| 2504 | end | 2523 | end |
| @@ -3206,6 +3225,13 @@ print("我有" .. tostring(math.random() * 100) .. "%的把握。") | |||
| 3206 | local integer = 1000000 | 3225 | local integer = 1000000 |
| 3207 | local hex = 0xEFBBBF | 3226 | local hex = 0xEFBBBF |
| 3208 | local binary = 19 | 3227 | local binary = 19 |
| 3228 | local str = "key: value\nlist:\n - item1\n - " .. tostring(expr) | ||
| 3229 | local fn | ||
| 3230 | fn = function() | ||
| 3231 | local str = "foo:\n bar: baz" | ||
| 3232 | return str | ||
| 3233 | end | ||
| 3234 | local str = "path: \"C:\\Program Files\\App\"\nnote: 'He said: \"" .. tostring(Hello) .. "!\"'" | ||
| 3209 | local my_function | 3235 | local my_function |
| 3210 | my_function = function() end | 3236 | my_function = function() end |
| 3211 | my_function() | 3237 | my_function() |
