diff options
Diffstat (limited to 'spec/outputs')
| -rw-r--r-- | spec/outputs/destructure.lua | 20 | ||||
| -rw-r--r-- | spec/outputs/string.lua | 2 |
2 files changed, 21 insertions, 1 deletions
diff --git a/spec/outputs/destructure.lua b/spec/outputs/destructure.lua index ba216b5..4e19aca 100644 --- a/spec/outputs/destructure.lua +++ b/spec/outputs/destructure.lua | |||
| @@ -711,4 +711,24 @@ do | |||
| 711 | return _accum_0 | 711 | return _accum_0 |
| 712 | end)(), _obj_0[#_obj_0 - 1], _obj_0[#_obj_0] | 712 | end)(), _obj_0[#_obj_0 - 1], _obj_0[#_obj_0] |
| 713 | end | 713 | end |
| 714 | do | ||
| 715 | local _list_0 = items | ||
| 716 | for _index_0 = 1, #_list_0 do | ||
| 717 | local _des_0 = _list_0[_index_0] | ||
| 718 | local a, b = _des_0.a, _des_0.b | ||
| 719 | print(a, b) | ||
| 720 | end | ||
| 721 | local _list_1 = items | ||
| 722 | for _index_0 = 1, #_list_1 do | ||
| 723 | local _des_0 = _list_1[_index_0] | ||
| 724 | local a, b = _des_0.a, _des_0.b | ||
| 725 | print(a, b) | ||
| 726 | end | ||
| 727 | for _des_0 in pairs(data) do | ||
| 728 | local body = _des_0.body | ||
| 729 | if body then | ||
| 730 | print(body) | ||
| 731 | end | ||
| 732 | end | ||
| 733 | end | ||
| 714 | return nil | 734 | return nil |
diff --git a/spec/outputs/string.lua b/spec/outputs/string.lua index b536e6d..bdfd676 100644 --- a/spec/outputs/string.lua +++ b/spec/outputs/string.lua | |||
| @@ -52,7 +52,7 @@ do | |||
| 52 | str = "user: " .. tostring(name) .. "\nid: " .. tostring(id) | 52 | str = "user: " .. tostring(name) .. "\nid: " .. tostring(id) |
| 53 | str = "path: \"C:\\\\Program Files\\\\App\"\ndesc: 'single \"quote\" test'" | 53 | str = "path: \"C:\\\\Program Files\\\\App\"\ndesc: 'single \"quote\" test'" |
| 54 | str = "key: value \nnext: 123 " | 54 | str = "key: value \nnext: 123 " |
| 55 | str = "list:\n - \"one\"\n - \"two\"" | 55 | str = "list:\n\t- \"one\"\n\t- \"two\"" |
| 56 | str = "-- comment\ncontent text\n-- comment" | 56 | str = "-- comment\ncontent text\n-- comment" |
| 57 | str = tostring(1 + 2) .. '\n' .. tostring(2 + 3) .. '\n' .. tostring("a" .. "b") | 57 | str = tostring(1 + 2) .. '\n' .. tostring(2 + 3) .. '\n' .. tostring("a" .. "b") |
| 58 | local obj = { | 58 | local obj = { |
