diff options
| author | Li Jin <dragon-fly@qq.com> | 2026-01-28 18:43:14 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2026-01-28 18:43:14 +0800 |
| commit | dd64edd58fe25ec74ae5958128cf3f74b0692f3b (patch) | |
| tree | 0f2de1df55897e2713977c5a53936757e14b477a /spec/inputs/test/close_attribute_spec.yue | |
| parent | 7c2a92b82e9808d3c5ea29b47d1c59d663fe984a (diff) | |
| download | yuescript-dd64edd58fe25ec74ae5958128cf3f74b0692f3b.tar.gz yuescript-dd64edd58fe25ec74ae5958128cf3f74b0692f3b.tar.bz2 yuescript-dd64edd58fe25ec74ae5958128cf3f74b0692f3b.zip | |
Fixed compiler issues and added 800+ test cases.
Diffstat (limited to 'spec/inputs/test/close_attribute_spec.yue')
| -rw-r--r-- | spec/inputs/test/close_attribute_spec.yue | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/inputs/test/close_attribute_spec.yue b/spec/inputs/test/close_attribute_spec.yue index 2354df7..ebda27e 100644 --- a/spec/inputs/test/close_attribute_spec.yue +++ b/spec/inputs/test/close_attribute_spec.yue | |||
| @@ -43,7 +43,7 @@ describe "close attribute", -> | |||
| 43 | closed = false | 43 | closed = false |
| 44 | obj = | 44 | obj = |
| 45 | value: 10 | 45 | value: 10 |
| 46 | close_method: <close>: => | 46 | <close>: => |
| 47 | closed = true | 47 | closed = true |
| 48 | 48 | ||
| 49 | do | 49 | do |
| @@ -82,9 +82,8 @@ describe "close attribute", -> | |||
| 82 | 82 | ||
| 83 | it "should work with table destructuring", -> | 83 | it "should work with table destructuring", -> |
| 84 | closed = false | 84 | closed = false |
| 85 | tb = {close: <close>: -> closed = true} | ||
| 86 | do | 85 | do |
| 87 | {:close} = tb | 86 | close tb = {<close>: -> closed = true} |
| 88 | assert.is_true closed | 87 | assert.is_true closed |
| 89 | 88 | ||
| 90 | it "should handle close with return value", -> | 89 | it "should handle close with return value", -> |
