diff options
| author | Li Jin <dragon-fly@qq.com> | 2026-01-21 10:05:19 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2026-01-21 10:05:19 +0800 |
| commit | 604a8e5e53cdc7391a502fcabf07e8f1cc2a778c (patch) | |
| tree | 18dca1f8314fe918d6173ed4acbdc84c5b541752 /spec/inputs/import_global.yue | |
| parent | c6229c02564024d8c02c2d438b2fc180ce4c6bcf (diff) | |
| download | yuescript-0.32.3.tar.gz yuescript-0.32.3.tar.bz2 yuescript-0.32.3.zip | |
Diffstat (limited to 'spec/inputs/import_global.yue')
| -rw-r--r-- | spec/inputs/import_global.yue | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/inputs/import_global.yue b/spec/inputs/import_global.yue index 18f0e85..d9e5c7f 100644 --- a/spec/inputs/import_global.yue +++ b/spec/inputs/import_global.yue | |||
| @@ -91,3 +91,20 @@ do | |||
| 91 | func! | 91 | func! |
| 92 | try func | 92 | try func |
| 93 | 93 | ||
| 94 | do | ||
| 95 | import global | ||
| 96 | f = -> | ||
| 97 | if result := try? func! | ||
| 98 | print result | ||
| 99 | |||
| 100 | switch Item | ||
| 101 | when 1 | ||
| 102 | print "one" | ||
| 103 | when 2 | ||
| 104 | print "two" | ||
| 105 | |||
| 106 | import global | ||
| 107 | f = -> | ||
| 108 | if a! < b! < c! | ||
| 109 | print "OK" | ||
| 110 | |||
