diff options
Diffstat (limited to 'tests/typ')
| -rw-r--r-- | tests/typ/bugs/newline-mode.typ | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/typ/bugs/newline-mode.typ b/tests/typ/bugs/newline-mode.typ index 30545eee..04333cc5 100644 --- a/tests/typ/bugs/newline-mode.typ +++ b/tests/typ/bugs/newline-mode.typ @@ -22,3 +22,63 @@ else { ("1", "2") } + +--- +// Ref: false +#test({ + "hi 1" + + .clusters() +}, ("h", "i", " ", "1")) + +--- +// Ref: false +#test({ + "hi 2"// comment + .clusters() +}, ("h", "i", " ", "2")) + +--- +// Ref: false +#test({ + "hi 3"/* comment */ + .clusters() +}, ("h", "i", " ", "3")) + +--- +// Ref: false +#test({ + "hi 4" + // comment + .clusters() +}, ("h", "i", " ", "4")) + +--- +// Ref: false +#test({ + "hi 5" + /*comment*/.clusters() +}, ("h", "i", " ", "5")) + +--- +// Ref: false +#test({ + "hi 6" + // comment + + + /* comment */ + .clusters() +}, ("h", "i", " ", "6")) + +--- +// Ref: false +#test({ + let foo(x) = { + if x < 0 { "negative" } + // comment + else { "non-negative" } + } + + foo(1) +}, "non-negative") |
