diff options
| author | Sébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com> | 2024-09-02 15:27:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-02 13:27:33 +0000 |
| commit | 1997db00f3908967dc381d9a84c0b246700e7112 (patch) | |
| tree | 255c7da88d19d9f2da9decee5301c52d0be05bde /tests/suite/scripting/import.typ | |
| parent | ecad396cc8e6a0c5742314907181c939f61ab96d (diff) | |
Parenthesized imports (#4869)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'tests/suite/scripting/import.typ')
| -rw-r--r-- | tests/suite/scripting/import.typ | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/suite/scripting/import.typ b/tests/suite/scripting/import.typ index 8bfa8ca6..8e2bc4b5 100644 --- a/tests/suite/scripting/import.typ +++ b/tests/suite/scripting/import.typ @@ -55,6 +55,49 @@ #test(name, "Klaus") #test(othername, "Klaus") +--- import-items-parenthesized --- +#import "module.typ": () +#import "module.typ": (a) +#import "module.typ": (a, b) +#import "module.typ": (a, b, c, d) + +#test(a, none) +#test(b, 1) +#test(c, 2) +#test(d, 3) + +--- import-items-parenthesized-multiline --- +#import "module.typ": ( + a +) +#import "module.typ": ( + a, b as e, + c, + + + d, +) + +#test(a, none) +#test(e, 1) +#test(c, 2) +#test(d, 3) + +--- import-items-parenthesized-invalid --- +// Error: 23-24 unclosed delimiter +#import "module.typ": (a, b, c + +--- import-items-parenthesized-invalid-2 --- +// Error: 23-24 unclosed delimiter +#import "module.typ": ( + +--- import-items-parenthesized-invalid-3 --- +// Error: 23-24 unclosed delimiter +#import "module.typ": ( + a, b, + c, + + --- import-from-function-scope --- // Test importing from function scopes. |
