diff options
Diffstat (limited to 'spec/outputs')
| -rw-r--r-- | spec/outputs/codes_from_doc.lua | 16 | ||||
| -rw-r--r-- | spec/outputs/codes_from_doc_zh.lua | 16 | ||||
| -rw-r--r-- | spec/outputs/tables.lua | 22 | ||||
| -rw-r--r-- | spec/outputs/with.lua | 30 |
4 files changed, 79 insertions, 5 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua index 3ee20bb..c7a2d50 100644 --- a/spec/outputs/codes_from_doc.lua +++ b/spec/outputs/codes_from_doc.lua | |||
| @@ -339,6 +339,14 @@ func({ | |||
| 339 | 2, | 339 | 2, |
| 340 | 3 | 340 | 3 |
| 341 | }) | 341 | }) |
| 342 | local f | ||
| 343 | f = function() | ||
| 344 | return { | ||
| 345 | 1, | ||
| 346 | 2, | ||
| 347 | 3 | ||
| 348 | } | ||
| 349 | end | ||
| 342 | local tb = { | 350 | local tb = { |
| 343 | name = "abc", | 351 | name = "abc", |
| 344 | values = { | 352 | values = { |
| @@ -2548,6 +2556,14 @@ func({ | |||
| 2548 | 2, | 2556 | 2, |
| 2549 | 3 | 2557 | 3 |
| 2550 | }) | 2558 | }) |
| 2559 | local f | ||
| 2560 | f = function() | ||
| 2561 | return { | ||
| 2562 | 1, | ||
| 2563 | 2, | ||
| 2564 | 3 | ||
| 2565 | } | ||
| 2566 | end | ||
| 2551 | local tb = { | 2567 | local tb = { |
| 2552 | name = "abc", | 2568 | name = "abc", |
| 2553 | values = { | 2569 | values = { |
diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua index 52204b7..fcde41f 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 | }) |
| 342 | local f | ||
| 343 | f = function() | ||
| 344 | return { | ||
| 345 | 1, | ||
| 346 | 2, | ||
| 347 | 3 | ||
| 348 | } | ||
| 349 | end | ||
| 342 | local tb = { | 350 | local tb = { |
| 343 | name = "abc", | 351 | name = "abc", |
| 344 | values = { | 352 | values = { |
| @@ -2542,6 +2550,14 @@ func({ | |||
| 2542 | 2, | 2550 | 2, |
| 2543 | 3 | 2551 | 3 |
| 2544 | }) | 2552 | }) |
| 2553 | local f | ||
| 2554 | f = function() | ||
| 2555 | return { | ||
| 2556 | 1, | ||
| 2557 | 2, | ||
| 2558 | 3 | ||
| 2559 | } | ||
| 2560 | end | ||
| 2545 | local tb = { | 2561 | local tb = { |
| 2546 | name = "abc", | 2562 | name = "abc", |
| 2547 | values = { | 2563 | values = { |
diff --git a/spec/outputs/tables.lua b/spec/outputs/tables.lua index f358811..3f851de 100644 --- a/spec/outputs/tables.lua +++ b/spec/outputs/tables.lua | |||
| @@ -366,6 +366,28 @@ local menus = { | |||
| 366 | } | 366 | } |
| 367 | } | 367 | } |
| 368 | } | 368 | } |
| 369 | _ = { | ||
| 370 | boolean = { | ||
| 371 | true, | ||
| 372 | false | ||
| 373 | }, | ||
| 374 | float = { | ||
| 375 | 3.14, | ||
| 376 | -6.8523015e+5 | ||
| 377 | }, | ||
| 378 | int = { | ||
| 379 | 123, | ||
| 380 | -685230 | ||
| 381 | }, | ||
| 382 | null = { | ||
| 383 | nodeName = 'node', | ||
| 384 | parent = nil | ||
| 385 | }, | ||
| 386 | string = { | ||
| 387 | 'Hello world', | ||
| 388 | "newline\nnewline2" | ||
| 389 | } | ||
| 390 | } | ||
| 369 | local tb | 391 | local tb |
| 370 | do | 392 | do |
| 371 | local _tab_0 = { } | 393 | local _tab_0 = { } |
diff --git a/spec/outputs/with.lua b/spec/outputs/with.lua index 20c5d44..867d1b5 100644 --- a/spec/outputs/with.lua +++ b/spec/outputs/with.lua | |||
| @@ -203,15 +203,35 @@ do | |||
| 203 | return _with_0 | 203 | return _with_0 |
| 204 | end)()) | 204 | end)()) |
| 205 | local a | 205 | local a |
| 206 | local _with_0 = tb | 206 | do |
| 207 | local _with_0 = tb | ||
| 208 | do | ||
| 209 | local _accum_0 | ||
| 210 | while true do | ||
| 211 | if _with_0.v then | ||
| 212 | _accum_0 = _with_0.a | ||
| 213 | break | ||
| 214 | end | ||
| 215 | end | ||
| 216 | _with_0 = _accum_0 | ||
| 217 | end | ||
| 218 | a = _with_0 | ||
| 219 | end | ||
| 207 | local _accum_0 | 220 | local _accum_0 |
| 208 | while true do | 221 | while true do |
| 209 | if _with_0.v then | 222 | local _with_0 = tb |
| 210 | _accum_0 = _with_0.a | 223 | local _accum_1 |
| 224 | while true do | ||
| 225 | if _with_0 ~= nil then | ||
| 226 | _accum_1 = 1 | ||
| 227 | break | ||
| 228 | end | ||
| 211 | break | 229 | break |
| 212 | end | 230 | end |
| 231 | _with_0 = _accum_1 | ||
| 232 | _accum_0 = _with_0 | ||
| 233 | break | ||
| 213 | end | 234 | end |
| 214 | _with_0 = _accum_0 | 235 | a = _accum_0 |
| 215 | a = _with_0 | ||
| 216 | end | 236 | end |
| 217 | return nil | 237 | return nil |
