diff options
| author | Li Jin <dragon-fly@qq.com> | 2026-02-11 16:58:21 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2026-02-11 16:58:21 +0800 |
| commit | 663a8c622db13b3a9dad962071ff6f3cfb482de3 (patch) | |
| tree | bafb5d2bc4a62cf2fa5be6a1a6bb21b0160d1c29 /spec/outputs/test/config_spec.lua | |
| parent | f85c61c5ff06c43d74ccf3233f56c6e5dc576319 (diff) | |
| download | yuescript-663a8c622db13b3a9dad962071ff6f3cfb482de3.tar.gz yuescript-663a8c622db13b3a9dad962071ff6f3cfb482de3.tar.bz2 yuescript-663a8c622db13b3a9dad962071ff6f3cfb482de3.zip | |
Supported multiple break values. Simplified some generated codes.
Diffstat (limited to 'spec/outputs/test/config_spec.lua')
| -rw-r--r-- | spec/outputs/test/config_spec.lua | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/outputs/test/config_spec.lua b/spec/outputs/test/config_spec.lua index 410bacc..dc98760 100644 --- a/spec/outputs/test/config_spec.lua +++ b/spec/outputs/test/config_spec.lua | |||
| @@ -114,14 +114,10 @@ return describe("config", function() | |||
| 114 | y = 20 | 114 | y = 20 |
| 115 | } | 115 | } |
| 116 | local result | 116 | local result |
| 117 | do | 117 | repeat |
| 118 | local _accum_0 | 118 | result = obj.x + obj.y |
| 119 | repeat | 119 | break |
| 120 | _accum_0 = obj.x + obj.y | 120 | until true |
| 121 | break | ||
| 122 | until true | ||
| 123 | result = _accum_0 | ||
| 124 | end | ||
| 125 | return assert.same(result, 30) | 121 | return assert.same(result, 30) |
| 126 | end) | 122 | end) |
| 127 | it("should handle existential operators", function() | 123 | it("should handle existential operators", function() |
