diff options
Diffstat (limited to 'spec/inputs')
| -rw-r--r-- | spec/inputs/import_global.yue | 17 | ||||
| -rw-r--r-- | spec/inputs/test/format_spec.yue | 1 |
2 files changed, 18 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 | |||
diff --git a/spec/inputs/test/format_spec.yue b/spec/inputs/test/format_spec.yue index 3ad2c7f..95f73fc 100644 --- a/spec/inputs/test/format_spec.yue +++ b/spec/inputs/test/format_spec.yue | |||
| @@ -51,6 +51,7 @@ files = [ | |||
| 51 | "spec/inputs/test/loops_spec.yue" | 51 | "spec/inputs/test/loops_spec.yue" |
| 52 | "spec/inputs/test/format_spec.yue" | 52 | "spec/inputs/test/format_spec.yue" |
| 53 | "spec/inputs/upvalue_func.yue" | 53 | "spec/inputs/upvalue_func.yue" |
| 54 | "spec/inputs/import_global.yue" | ||
| 54 | "spec/inputs/unicode/macro_export.yue" | 55 | "spec/inputs/unicode/macro_export.yue" |
| 55 | "spec/inputs/unicode/attrib.yue" | 56 | "spec/inputs/unicode/attrib.yue" |
| 56 | "spec/inputs/unicode/macro.yue" | 57 | "spec/inputs/unicode/macro.yue" |
