diff options
Diffstat (limited to 'tests/typ/bugs')
82 files changed, 0 insertions, 1245 deletions
diff --git a/tests/typ/bugs/1050-terms-indent.typ b/tests/typ/bugs/1050-terms-indent.typ deleted file mode 100644 index 82376820..00000000 --- a/tests/typ/bugs/1050-terms-indent.typ +++ /dev/null @@ -1,11 +0,0 @@ -#set page(width: 200pt) -#set par(first-line-indent: 0.5cm) - -- #lorem(10) -- #lorem(10) - -+ #lorem(10) -+ #lorem(10) - -/ Term 1: #lorem(10) -/ Term 2: #lorem(10) diff --git a/tests/typ/bugs/1240-stack-fr.typ b/tests/typ/bugs/1240-stack-fr.typ deleted file mode 100644 index fa49dce7..00000000 --- a/tests/typ/bugs/1240-stack-fr.typ +++ /dev/null @@ -1,18 +0,0 @@ -// This issue is sort of horrible: When you write `h(1fr)` in a `stack` instead -// of directly `1fr`, things go awry. To fix this, we now transparently detect -// h/v children. -// -// https://github.com/typst/typst/issues/1240 - ---- -#stack(dir: ltr, [a], 1fr, [b], 1fr, [c]) -#stack(dir: ltr, [a], h(1fr), [b], h(1fr), [c]) - ---- -#set page(height: 60pt) -#stack( - dir: ltr, - spacing: 1fr, - stack([a], 1fr, [b]), - stack([a], v(1fr), [b]), -) diff --git a/tests/typ/bugs/1597-cite-footnote.typ b/tests/typ/bugs/1597-cite-footnote.typ deleted file mode 100644 index cc231e2a..00000000 --- a/tests/typ/bugs/1597-cite-footnote.typ +++ /dev/null @@ -1,12 +0,0 @@ -// Tests that when a citation footnote is pushed to next page, things still -// work as expected. -// -// Issue: https://github.com/typst/typst/issues/1597 - ---- -#set page(height: 60pt) -#lorem(4) - -#footnote[@netwok] -#show bibliography: none -#bibliography("/assets/bib/works.bib") diff --git a/tests/typ/bugs/2044-invalid-parsed-ident.typ b/tests/typ/bugs/2044-invalid-parsed-ident.typ deleted file mode 100644 index 5e4b560c..00000000 --- a/tests/typ/bugs/2044-invalid-parsed-ident.typ +++ /dev/null @@ -1,6 +0,0 @@ -// In this bug, the dot at the end was causing the right parenthesis to be -// parsed as an identifier instead of the closing right parenthesis. -// Issue: https://github.com/typst/typst/issues/2044 - -$floor(phi.alt.)$ -$floor(phi.alt. )$ diff --git a/tests/typ/bugs/2105-linebreak-tofu.typ b/tests/typ/bugs/2105-linebreak-tofu.typ deleted file mode 100644 index 4dd5a244..00000000 --- a/tests/typ/bugs/2105-linebreak-tofu.typ +++ /dev/null @@ -1 +0,0 @@ -#linebreak()中文 diff --git a/tests/typ/bugs/2595-float-overlap.typ b/tests/typ/bugs/2595-float-overlap.typ deleted file mode 100644 index 7c7f68c9..00000000 --- a/tests/typ/bugs/2595-float-overlap.typ +++ /dev/null @@ -1,13 +0,0 @@ -#set page(height: 80pt) - -Start. - -#place(auto, float: true, [ - #block(height: 100%, width: 100%, fill: aqua) -]) - -#place(auto, float: true, [ - #block(height: 100%, width: 100%, fill: red) -]) - -#lorem(20) diff --git a/tests/typ/bugs/2650-cjk-latin-spacing-meta.typ b/tests/typ/bugs/2650-cjk-latin-spacing-meta.typ deleted file mode 100644 index 12c7ea41..00000000 --- a/tests/typ/bugs/2650-cjk-latin-spacing-meta.typ +++ /dev/null @@ -1,5 +0,0 @@ -// https://github.com/typst/typst/issues/2650 - -测a试 - -测#context [a]试 diff --git a/tests/typ/bugs/2715-float-order.typ b/tests/typ/bugs/2715-float-order.typ deleted file mode 100644 index af0684a1..00000000 --- a/tests/typ/bugs/2715-float-order.typ +++ /dev/null @@ -1,19 +0,0 @@ -#set page(height: 180pt) -#set figure(placement: auto) - -#figure( - rect(height: 60pt), - caption: [Rectangle I], -) - -#figure( - rect(height: 50pt), - caption: [Rectangle II], -) - -#figure( - circle(), - caption: [Circle], -) - -#lorem(20) diff --git a/tests/typ/bugs/2821-missing-fields.typ b/tests/typ/bugs/2821-missing-fields.typ deleted file mode 100644 index 0fec2043..00000000 --- a/tests/typ/bugs/2821-missing-fields.typ +++ /dev/null @@ -1,9 +0,0 @@ -// Issue #2821: Setting a figure's supplement to none removes the field -// Ref: false - ---- -#show figure.caption: it => { - assert(it.has("supplement")) - assert(it.supplement == none) -} -#figure([], caption: [], supplement: none) diff --git a/tests/typ/bugs/2902-gradient-oklch-panic.typ b/tests/typ/bugs/2902-gradient-oklch-panic.typ deleted file mode 100644 index 6e09df52..00000000 --- a/tests/typ/bugs/2902-gradient-oklch-panic.typ +++ /dev/null @@ -1,20 +0,0 @@ -// Minimal reproduction of #2902 -// Ref: false - ---- -#set page(width: 15cm, height: auto, margin: 1em) -#set block(width: 100%, height: 1cm, above: 2pt) - -// Oklch -#block(fill: gradient.linear(red, purple, space: oklch)) -#block(fill: gradient.linear(..color.map.rainbow, space: oklch)) -#block(fill: gradient.linear(..color.map.plasma, space: oklch)) - ---- -#set page(width: 15cm, height: auto, margin: 1em) -#set block(width: 100%, height: 1cm, above: 2pt) - -// Oklab -#block(fill: gradient.linear(red, purple, space: oklab)) -#block(fill: gradient.linear(..color.map.rainbow, space: oklab)) -#block(fill: gradient.linear(..color.map.plasma, space: oklab)) diff --git a/tests/typ/bugs/3082-chinese-punctuation.typ b/tests/typ/bugs/3082-chinese-punctuation.typ deleted file mode 100644 index 82cab6f6..00000000 --- a/tests/typ/bugs/3082-chinese-punctuation.typ +++ /dev/null @@ -1,4 +0,0 @@ -#set text(font: "Noto Serif CJK TC", lang: "zh") -#set page(width: 230pt) - -課有手冬,朱得過已誰卜服見以大您即乙太邊良,因且行肉因和拉幸,念姐遠米巴急(abc0),松黃貫誰。 diff --git a/tests/typ/bugs/3110-no-type-ctor-or-field.typ b/tests/typ/bugs/3110-no-type-ctor-or-field.typ deleted file mode 100644 index 61d65253..00000000 --- a/tests/typ/bugs/3110-no-type-ctor-or-field.typ +++ /dev/null @@ -1,15 +0,0 @@ -// Issue #3110: let the error message report the type name. -// https://github.com/typst/typst/issues/3110 -// Ref: false - ---- -// Error: 2-9 type content does not have a constructor -#content() - ---- -// Error: 6-12 type integer does not contain field `MAXVAL` -#int.MAXVAL - ---- -// Error: 6-18 type string does not contain field `from-unïcode` -#str.from-unïcode(97) diff --git a/tests/typ/bugs/3154-array-dict-mut-entry.typ b/tests/typ/bugs/3154-array-dict-mut-entry.typ deleted file mode 100644 index b5a52814..00000000 --- a/tests/typ/bugs/3154-array-dict-mut-entry.typ +++ /dev/null @@ -1,109 +0,0 @@ -// Issue #3154: Confusing errors from methods supposed to return a mutable entry -// https://github.com/typst/typst/issues/3154 -// Ref: false - ---- -#{ - let array = () - // Error: 3-16 array is empty - array.first() -} - ---- -#{ - let array = () - // Error: 3-16 array is empty - array.first() = 9 -} - ---- -#{ - let array = () - // Error: 3-15 array is empty - array.last() -} - ---- -#{ - let array = () - // Error: 3-15 array is empty - array.last() = 9 -} - ---- -#{ - let array = (1,) - // Error: 3-14 array index out of bounds (index: 1, len: 1) and no default value was specified - array.at(1) -} - ---- -#{ - let array = (1,) - test(array.at(1, default: 0), 0) -} - ---- -#{ - let array = (1,) - // Error: 3-14 array index out of bounds (index: 1, len: 1) - array.at(1) = 9 -} - ---- -#{ - let array = (1,) - // Error: 3-26 array index out of bounds (index: 1, len: 1) - array.at(1, default: 0) = 9 -} - ---- -#{ - let dict = (a: 1) - // Error: 3-15 dictionary does not contain key "b" and no default value was specified - dict.at("b") -} - ---- -#{ - let dict = (a: 1) - test(dict.at("b", default: 0), 0) -} - ---- -#{ - let dict = (a: 1) - // Error: 3-15 dictionary does not contain key "b" - // Hint: 3-15 use `insert` to add or update values - dict.at("b") = 9 -} - ---- -#{ - let dict = (a: 1) - // Error: 3-27 dictionary does not contain key "b" - // Hint: 3-27 use `insert` to add or update values - dict.at("b", default: 0) = 9 -} - ---- -#{ - let dict = (a: 1) - // Error: 8-9 dictionary does not contain key "b" - dict.b -} - ---- -#{ - let dict = (a: 1) - dict.b = 9 - test(dict, (a: 1, b: 9)) -} - ---- -#{ - let dict = (a: 1) - // Error: 3-9 dictionary does not contain key "b" - // Hint: 3-9 use `insert` to add or update values - dict.b += 9 -} diff --git a/tests/typ/bugs/3232-dict-wrong-keys.typ b/tests/typ/bugs/3232-dict-wrong-keys.typ deleted file mode 100644 index 61d9e8b8..00000000 --- a/tests/typ/bugs/3232-dict-wrong-keys.typ +++ /dev/null @@ -1,23 +0,0 @@ -// Issue #3232: Confusing "expected relative length or dictionary, found dictionary" -// https://github.com/typst/typst/issues/3232 -// Ref: false - ---- -// Error: 16-58 unexpected keys "unexpected" and "unexpected-too" -#block(outset: (unexpected: 0.5em, unexpected-too: 0.2em), [Hi]) - ---- -// Error: 14-56 unexpected keys "unexpected" and "unexpected-too" -#box(radius: (unexpected: 0.5em, unexpected-too: 0.5em), [Hi]) - ---- -// Error: 16-49 unexpected key "unexpected", valid keys are "left", "top", "right", "bottom", "x", "y", and "rest" -#block(outset: (unexpected: 0.2em, right: 0.5em), [Hi]) // The 1st key is unexpected - ---- -// Error: 14-50 unexpected key "unexpected", valid keys are "top-left", "top-right", "bottom-right", "bottom-left", "left", "top", "right", "bottom", and "rest" -#box(radius: (top-left: 0.5em, unexpected: 0.5em), [Hi]) // The 2nd key is unexpected - ---- -#block(outset: (:), [Hi]) // Ok -#box(radius: (:), [Hi]) // Ok diff --git a/tests/typ/bugs/3275-loop-errors.typ b/tests/typ/bugs/3275-loop-errors.typ deleted file mode 100644 index 9fdd2961..00000000 --- a/tests/typ/bugs/3275-loop-errors.typ +++ /dev/null @@ -1,67 +0,0 @@ -// Issue #3275: clearer errors for loops, https://github.com/typst/typst/issues/3275 -// Ref: false - ---- -// Normal variable. -#for x in (1, 2) {} -#for x in (a: 1, b: 2) {} -#for x in "foo" {} -#for x in bytes("😊") {} - ---- -// Placeholder. -#for _ in (1, 2) {} -#for _ in (a: 1, b: 2) {} -#for _ in "foo" {} -#for _ in bytes("😊") {} - ---- -// Destructuring. -#for (a,b,c) in (("a", 1, bytes(())), ("b", 2, bytes(""))) {} -#for (a, ..) in (("a", 1, bytes(())), ("b", 2, bytes(""))) {} -#for (k, v) in (a: 1, b: 2, c: 3) {} -#for (.., v) in (a: 1, b: 2, c: 3) {} - ---- -// Error: 11-17 cannot loop over content -#for x in [1, 2] {} - ---- -// Error: 11-25 cannot loop over arguments -#for _ in arguments("a") {} - ---- -// Error: 16-21 cannot loop over integer -#for (x, y) in 12306 {} - ---- -// Error: 16-22 cannot loop over content -#for (x, y) in [1, 2] {} - ---- -// Error: 6-12 cannot destructure values of string -#for (x, y) in "foo" {} - ---- -// Error: 6-12 cannot destructure string -#for (x, y) in ("foo", "bar") {} - ---- -// Error: 6-12 cannot destructure values of bytes -#for (x, y) in bytes("😊") {} - ---- -// Error: 6-12 cannot destructure bytes -#for (x, y) in (bytes((1,2)), bytes((1,2))) {} - ---- -// Error: 6-12 cannot destructure integer -#for (x, y) in (1, 2) {} - ---- -// Error: 10-11 not enough elements to destructure -#for (x, y) in ((1,), (2,)) {} - ---- -// Error: 6-12 too many elements to destructure -#for (x, y) in ((1,2,3), (4,5,6)) {} diff --git a/tests/typ/bugs/3363-json-large-number.typ b/tests/typ/bugs/3363-json-large-number.typ deleted file mode 100644 index 57d37f1b..00000000 --- a/tests/typ/bugs/3363-json-large-number.typ +++ /dev/null @@ -1,8 +0,0 @@ -// Big numbers (larger than what i64 can store) should just lose some precision -// but not overflow -// https://github.com/typst/typst/issues/3363 -// Ref: false - -#let bignum = json("/assets/data/big-number.json") - -#bignum
\ No newline at end of file diff --git a/tests/typ/bugs/3502-colon-space.typ b/tests/typ/bugs/3502-colon-space.typ deleted file mode 100644 index 35f38a9b..00000000 --- a/tests/typ/bugs/3502-colon-space.typ +++ /dev/null @@ -1,14 +0,0 @@ -// Test that a space after a named parameter is permissible. -// https://github.com/typst/typst/issues/3502 -// Ref: false - ---- -#let f( param : v ) = param -#test(f( param /* ok */ : 2 ), 2) - ---- -#let ( key : /* hi */ binding ) = ( key: "ok" ) -#test(binding, "ok") - ---- -#test(( key : "value" ).key, "value") diff --git a/tests/typ/bugs/3586-figure-caption-separator.typ b/tests/typ/bugs/3586-figure-caption-separator.typ deleted file mode 100644 index ee992c50..00000000 --- a/tests/typ/bugs/3586-figure-caption-separator.typ +++ /dev/null @@ -1,7 +0,0 @@ -// Test that figure caption separator is synthesized correctly. -// https://github.com/typst/typst/issues/3586 -// Ref: false - ---- -#show figure.caption: c => test(c.separator, [#": "]) -#figure(table[], caption: [This is a test caption]) diff --git a/tests/typ/bugs/3601-empty-raw.typ b/tests/typ/bugs/3601-empty-raw.typ deleted file mode 100644 index 3fb39aca..00000000 --- a/tests/typ/bugs/3601-empty-raw.typ +++ /dev/null @@ -1,7 +0,0 @@ -// Test that empty raw block with `typ` language doesn't cause a crash. -// https://github.com/typst/typst/issues/3601 -// Ref: false - ---- -```typ -``` diff --git a/tests/typ/bugs/3641-float-loop.typ b/tests/typ/bugs/3641-float-loop.typ deleted file mode 100644 index 4021fb4f..00000000 --- a/tests/typ/bugs/3641-float-loop.typ +++ /dev/null @@ -1,11 +0,0 @@ -// Flow layout should terminate! -// https://github.com/typst/typst/issues/3641 -// -// This is not yet ideal: The heading should not move to the second page, but -// that's a separate bug and not a regression. - ---- -#set page(height: 40pt) - -= Heading -#lorem(6) diff --git a/tests/typ/bugs/3650-italic-equation.typ b/tests/typ/bugs/3650-italic-equation.typ deleted file mode 100644 index c9b47543..00000000 --- a/tests/typ/bugs/3650-italic-equation.typ +++ /dev/null @@ -1,4 +0,0 @@ -_abc $sin(x) "abc"$_ \ -$italic(sin(x) "abc" #box[abc])$ \ -*abc $sin(x) "abc"$* \ -$bold(sin(x) "abc" #box[abc])$ \ diff --git a/tests/typ/bugs/3658-math-size.typ b/tests/typ/bugs/3658-math-size.typ deleted file mode 100644 index 63c020b2..00000000 --- a/tests/typ/bugs/3658-math-size.typ +++ /dev/null @@ -1,5 +0,0 @@ -// https://github.com/typst/typst/issues/3658 - ---- -$ #rect[$1/2$] $ -$#rect[$1/2$]$ diff --git a/tests/typ/bugs/3662-pdf-smartquotes.typ b/tests/typ/bugs/3662-pdf-smartquotes.typ deleted file mode 100644 index 36dc8a15..00000000 --- a/tests/typ/bugs/3662-pdf-smartquotes.typ +++ /dev/null @@ -1,12 +0,0 @@ -// Smart quotes were not appearing in the PDF outline, because they didn't -// implement `PlainText` -// https://github.com/typst/typst/issues/3662 - ---- -= It's "Unnormal Heading" -= It’s “Normal Heading” - -#set smartquote(enabled: false) -= It's "Unnormal Heading" -= It's 'single quotes' -= It’s “Normal Heading”
\ No newline at end of file diff --git a/tests/typ/bugs/3700-deformed-stroke.typ b/tests/typ/bugs/3700-deformed-stroke.typ deleted file mode 100644 index 7ca6ba6b..00000000 --- a/tests/typ/bugs/3700-deformed-stroke.typ +++ /dev/null @@ -1,11 +0,0 @@ -// Test shape fill & stroke for specific values that used to make the stroke -// deformed. -// https://github.com/typst/typst/issues/3700 - ---- -#rect( - radius: 1mm, - width: 100%, - height: 10pt, - stroke: (left: rgb("46b3c2") + 16.0mm), -)
\ No newline at end of file diff --git a/tests/typ/bugs/3841-tabs-in-raw-typ-code.typ b/tests/typ/bugs/3841-tabs-in-raw-typ-code.typ deleted file mode 100644 index db04fe3c..00000000 --- a/tests/typ/bugs/3841-tabs-in-raw-typ-code.typ +++ /dev/null @@ -1,20 +0,0 @@ -// Issue 3841 Tab chars are not rendered in raw blocks with lang: "typ(c)" -// https://github.com/typst/typst/issues/3841 - -#raw("#if true {\n\tf()\t// typ\n}", lang: "typ") - -#raw("if true {\n\tf()\t// typc\n}", lang: "typc") - -```typ -#if true { - // tabs around f() - f() // typ -} -``` - -```typc -if true { - // tabs around f() - f() // typc -} -``` diff --git a/tests/typ/bugs/870-image-rotation.typ b/tests/typ/bugs/870-image-rotation.typ deleted file mode 100644 index 5d7b5597..00000000 --- a/tests/typ/bugs/870-image-rotation.typ +++ /dev/null @@ -1,6 +0,0 @@ -// Ensure that EXIF rotation is applied. -// https://github.com/image-rs/image/issues/1045 - ---- -// File is from https://magnushoff.com/articles/jpeg-orientation/ -#image("/assets/images/f2t.jpg", width: 10pt) diff --git a/tests/typ/bugs/args-sink.typ b/tests/typ/bugs/args-sink.typ deleted file mode 100644 index 4f7492ac..00000000 --- a/tests/typ/bugs/args-sink.typ +++ /dev/null @@ -1,5 +0,0 @@ -// Test bugs with argument sinks. - ---- -#let foo(..body) = repr(body.pos()) -#foo(a: "1", b: "2", 1, 2, 3, 4, 5, 6) diff --git a/tests/typ/bugs/args-underscore.typ b/tests/typ/bugs/args-underscore.typ deleted file mode 100644 index ca3c0ff8..00000000 --- a/tests/typ/bugs/args-underscore.typ +++ /dev/null @@ -1,5 +0,0 @@ -// Test that lone underscore works. -// Ref: false - ---- -#test((1, 2, 3).map(_ => {}).len(), 3) diff --git a/tests/typ/bugs/bibliography-math.typ b/tests/typ/bugs/bibliography-math.typ deleted file mode 100644 index 3aab4b88..00000000 --- a/tests/typ/bugs/bibliography-math.typ +++ /dev/null @@ -1,4 +0,0 @@ -#set page(width: 200pt) - -@Zee04 -#bibliography("/assets/bib/works_too.bib", style: "mla") diff --git a/tests/typ/bugs/bidi-tofus.typ b/tests/typ/bugs/bidi-tofus.typ deleted file mode 100644 index 3b43b280..00000000 --- a/tests/typ/bugs/bidi-tofus.typ +++ /dev/null @@ -1,7 +0,0 @@ -// Test that shaping missing characters in both left-to-right and -// right-to-left directions does not cause a crash. - ---- -#"\u{590}\u{591}\u{592}\u{593}" - -#"\u{30000}\u{30001}\u{30002}\u{30003}" diff --git a/tests/typ/bugs/block-width-box.typ b/tests/typ/bugs/block-width-box.typ deleted file mode 100644 index a039bc66..00000000 --- a/tests/typ/bugs/block-width-box.typ +++ /dev/null @@ -1,6 +0,0 @@ -// Test box in 100% width block. - ---- -#block(width: 100%, fill: red, box("a box")) - -#block(width: 100%, fill: red, [#box("a box") #box()]) diff --git a/tests/typ/bugs/cite-locate.typ b/tests/typ/bugs/cite-locate.typ deleted file mode 100644 index 699bb085..00000000 --- a/tests/typ/bugs/cite-locate.typ +++ /dev/null @@ -1,23 +0,0 @@ -// Test citation in other introspection. - ---- -#set page(width: 180pt) -#set heading(numbering: "1") - -#outline( - title: [List of Figures], - target: figure.where(kind: image), -) - -#pagebreak() - -= Introduction <intro> -#figure( - rect[-- PIRATE --], - caption: [A pirate @arrgh in @intro], -) - -#context [Citation @distress on page #here().page()] - -#pagebreak() -#bibliography("/assets/bib/works.bib", style: "chicago-notes") diff --git a/tests/typ/bugs/cite-show-set.typ b/tests/typ/bugs/cite-show-set.typ deleted file mode 100644 index f476dd49..00000000 --- a/tests/typ/bugs/cite-show-set.typ +++ /dev/null @@ -1,9 +0,0 @@ -// Test show set rules on citations. - ---- -#show cite: set text(red) -A @netwok @arrgh. -B #cite(<netwok>) #cite(<arrgh>). - -#show bibliography: none -#bibliography("/assets/bib/works.bib") diff --git a/tests/typ/bugs/clamp-panic.typ b/tests/typ/bugs/clamp-panic.typ deleted file mode 100644 index 5f167c76..00000000 --- a/tests/typ/bugs/clamp-panic.typ +++ /dev/null @@ -1,3 +0,0 @@ -#set page(height: 20pt, margin: 0pt) -#v(22pt) -#block(fill: red, width: 100%, height: 10pt, radius: 4pt) diff --git a/tests/typ/bugs/columns-1.typ b/tests/typ/bugs/columns-1.typ deleted file mode 100644 index 96a4d0e5..00000000 --- a/tests/typ/bugs/columns-1.typ +++ /dev/null @@ -1,12 +0,0 @@ -// The well-known columns bug. - ---- -#set page(height: 70pt) - -Hallo -#columns(2)[ - = A - Text - = B - Text -] diff --git a/tests/typ/bugs/emoji-linebreak.typ b/tests/typ/bugs/emoji-linebreak.typ deleted file mode 100644 index 2f7e74e7..00000000 --- a/tests/typ/bugs/emoji-linebreak.typ +++ /dev/null @@ -1,6 +0,0 @@ -// Test that there are no linebreaks in composite emoji (issue #80). - ---- -#set page(width: 50pt, height: auto) -#h(99%) 🏳️🌈 -🏳️🌈 diff --git a/tests/typ/bugs/equation-numbering-reference.typ b/tests/typ/bugs/equation-numbering-reference.typ deleted file mode 100644 index 3423f022..00000000 --- a/tests/typ/bugs/equation-numbering-reference.typ +++ /dev/null @@ -1,15 +0,0 @@ -// In this bug, the hint and error messages for an equation -// being reference mentioned that it was a "heading" and was -// lacking the proper path. -// Ref: false - ---- -#set page(height: 70pt) - -$ - Delta = b^2 - 4 a c -$ <quadratic> - -// Error: 14-24 cannot reference equation without numbering -// Hint: 14-24 you can enable equation numbering with `#set math.equation(numbering: "1.")` -Looks at the @quadratic formula.
\ No newline at end of file diff --git a/tests/typ/bugs/flow-1.typ b/tests/typ/bugs/flow-1.typ deleted file mode 100644 index 425a0ce8..00000000 --- a/tests/typ/bugs/flow-1.typ +++ /dev/null @@ -1,11 +0,0 @@ -// In this bug, the first line of the second paragraph was on its page alone an -// the rest moved down. The reason was that the second block resulted in -// overlarge frames because the region wasn't finished properly. - ---- -#set page(height: 70pt) -#block[This file tests a bug where an almost empty page occurs.] -#block[ - The text in this second block was torn apart and split up for - some reason beyond my knowledge. -] diff --git a/tests/typ/bugs/flow-2.typ b/tests/typ/bugs/flow-2.typ deleted file mode 100644 index 5ffffd58..00000000 --- a/tests/typ/bugs/flow-2.typ +++ /dev/null @@ -1,10 +0,0 @@ -// In this bug, the first part of the paragraph moved down to the second page -// because trailing leading wasn't trimmed, resulting in an overlarge frame. - ---- -#set page(height: 60pt) -#v(19pt) -#block[ - But, soft! what light through yonder window breaks? - It is the east, and Juliet is the sun. -] diff --git a/tests/typ/bugs/flow-3.typ b/tests/typ/bugs/flow-3.typ deleted file mode 100644 index 71af1914..00000000 --- a/tests/typ/bugs/flow-3.typ +++ /dev/null @@ -1,12 +0,0 @@ -// In this bug, there was a bit of space below the heading because weak spacing -// directly before a layout-induced column or page break wasn't trimmed. - ---- -#set page(height: 60pt) -#rect(inset: 0pt, columns(2)[ - Text - #v(12pt) - Hi - #v(10pt, weak: true) - At column break. -]) diff --git a/tests/typ/bugs/flow-4.typ b/tests/typ/bugs/flow-4.typ deleted file mode 100644 index f49873f5..00000000 --- a/tests/typ/bugs/flow-4.typ +++ /dev/null @@ -1,5 +0,0 @@ -// In this bug, a frame intended for the second region ended up in the first. - ---- -#set page(height: 105pt) -#block(lorem(20)) diff --git a/tests/typ/bugs/flow-5.typ b/tests/typ/bugs/flow-5.typ deleted file mode 100644 index 5e580b9e..00000000 --- a/tests/typ/bugs/flow-5.typ +++ /dev/null @@ -1,13 +0,0 @@ -// This bug caused an index-out-of-bounds panic when layouting paragraphs needed -// multiple reorderings. - ---- -#set page(height: 200pt) -#lorem(30) - -#figure(placement: auto, block(height: 100%)) - -#lorem(10) - -#lorem(10) - diff --git a/tests/typ/bugs/fold-vector.typ b/tests/typ/bugs/fold-vector.typ deleted file mode 100644 index 5d57ad33..00000000 --- a/tests/typ/bugs/fold-vector.typ +++ /dev/null @@ -1,20 +0,0 @@ -// Test fold order of vectors. - ---- -#set text(features: (liga: 1)) -#set text(features: (liga: 0)) -fi - ---- -#underline(stroke: aqua + 4pt)[ - #underline[Hello] -] - ---- -#let c = counter("mycounter") -#c.update(1) -#locate(loc => [ - #c.update(2) - #c.at(loc) \ - Second: #locate(loc => c.at(loc)) -]) diff --git a/tests/typ/bugs/footnote-keep-multiple.typ b/tests/typ/bugs/footnote-keep-multiple.typ deleted file mode 100644 index e4efe3ce..00000000 --- a/tests/typ/bugs/footnote-keep-multiple.typ +++ /dev/null @@ -1,10 +0,0 @@ -// Test that the logic that keeps footnote entry together with -// their markers also works for multiple footnotes in a single -// line or frame (here, there are two lines, but they are one -// unit due to orphan prevention). - ---- -#set page(height: 100pt) -#v(40pt) -A #footnote[a] \ -B #footnote[b] diff --git a/tests/typ/bugs/footnote-list.typ b/tests/typ/bugs/footnote-list.typ deleted file mode 100644 index ceece0ca..00000000 --- a/tests/typ/bugs/footnote-list.typ +++ /dev/null @@ -1,11 +0,0 @@ -// Test that footnotes in lists do not produce extraneous page breaks. The list -// layout itself does not currently react to the footnotes layout, weakening the -// "footnote and its entry are on the same page" invariant somewhat, but at -// least there shouldn't be extra page breaks. - ---- -#set page(height: 100pt) -#block(height: 50pt, width: 100%, fill: aqua) - -- #footnote[1] -- #footnote[2] diff --git a/tests/typ/bugs/gradient-cmyk-encode.typ b/tests/typ/bugs/gradient-cmyk-encode.typ deleted file mode 100644 index 5e0b58dc..00000000 --- a/tests/typ/bugs/gradient-cmyk-encode.typ +++ /dev/null @@ -1,27 +0,0 @@ -// Test that CMYK works on gradients - ---- -#set page(margin: 0pt, width: 200pt, height: auto) - -#let violet = cmyk(75%, 80%, 0%, 0%) -#let blue = cmyk(75%, 30%, 0%, 0%) - -#rect( - width: 100%, - height: 30pt, - fill: gradient.linear(violet, blue) -) - -#rect( - width: 100%, - height: 30pt, - fill: gradient.linear(rgb(violet), rgb(blue)) -) - -// In PDF format, this gradient can look different from the others. -// This is because PDF readers do weird things with CMYK. -#rect( - width: 100%, - height: 30pt, - fill: gradient.linear(violet, blue, space: cmyk) -) diff --git a/tests/typ/bugs/grid-1.typ b/tests/typ/bugs/grid-1.typ deleted file mode 100644 index c583cfe5..00000000 --- a/tests/typ/bugs/grid-1.typ +++ /dev/null @@ -1,16 +0,0 @@ -// Test that grid base for auto rows makes sense. - ---- -#set page(height: 150pt) -#table( - columns: (1.5cm, auto), - rows: (auto, auto), - rect(width: 100%, fill: red), - rect(width: 100%, fill: blue), - rect(width: 100%, height: 50%, fill: green), -) - ---- -#rect(width: 100%, height: 1em) -- #rect(width: 100%, height: 1em) - - #rect(width: 100%, height: 1em) diff --git a/tests/typ/bugs/grid-2.typ b/tests/typ/bugs/grid-2.typ deleted file mode 100644 index b7528b7b..00000000 --- a/tests/typ/bugs/grid-2.typ +++ /dev/null @@ -1,20 +0,0 @@ -// Grid now skips a remaining region when one of the cells -// doesn't fit into it at all. - ---- -#set page(height: 100pt) -#grid( - columns: (2cm, auto), - rows: (auto, auto), - rect(width: 100%, fill: red), - rect(width: 100%, fill: blue), - rect(width: 100%, height: 80%, fill: green), - [hello \ darkness #parbreak() my \ old \ friend \ I], - rect(width: 100%, height: 20%, fill: blue), - polygon(fill: red, (0%, 0%), (100%, 0%), (100%, 20%)) -) - ---- -#set page(height: 60pt) -#lorem(5) -- #lorem(5) diff --git a/tests/typ/bugs/grid-3.typ b/tests/typ/bugs/grid-3.typ deleted file mode 100644 index 19317c50..00000000 --- a/tests/typ/bugs/grid-3.typ +++ /dev/null @@ -1,8 +0,0 @@ -// Ensure that the list does not jump to the third page. - ---- -#set page(height: 70pt) -#v(40pt) -The following: -+ A -+ B diff --git a/tests/typ/bugs/grid-4.typ b/tests/typ/bugs/grid-4.typ deleted file mode 100644 index 691bf877..00000000 --- a/tests/typ/bugs/grid-4.typ +++ /dev/null @@ -1,17 +0,0 @@ -// Ensure gutter rows at the top or bottom of a region are skipped. - ---- -#set page(height: 10em) - -#table( - row-gutter: 1.5em, - inset: 0pt, - rows: (1fr, auto), - [a], - [], - [], - [f], - [e\ e], - [], - [a] -) diff --git a/tests/typ/bugs/hide-meta.typ b/tests/typ/bugs/hide-meta.typ deleted file mode 100644 index 8d2c7cb6..00000000 --- a/tests/typ/bugs/hide-meta.typ +++ /dev/null @@ -1,24 +0,0 @@ -// Test that metadata of hidden stuff stays available. - ---- -#set cite(style: "chicago-notes") - -A pirate. @arrgh \ -#set text(2pt) -#hide[ - A @arrgh pirate. - #bibliography("/assets/bib/works.bib") -] - ---- -#set text(8pt) -#outline() -#set text(2pt) -#hide(block(grid( - [= A], - [= B], - block(grid( - [= C], - [= D], - )) -))) diff --git a/tests/typ/bugs/int-constructor.typ b/tests/typ/bugs/int-constructor.typ deleted file mode 100644 index 0bdce612..00000000 --- a/tests/typ/bugs/int-constructor.typ +++ /dev/null @@ -1,7 +0,0 @@ -// Test that integer -> integer conversion doesn't do a roundtrip through float. -// Ref: false - ---- -#let x = 9223372036854775800 -#test(type(x), int) -#test(int(x), x) diff --git a/tests/typ/bugs/justify-hanging-indent.typ b/tests/typ/bugs/justify-hanging-indent.typ deleted file mode 100644 index 511aa172..00000000 --- a/tests/typ/bugs/justify-hanging-indent.typ +++ /dev/null @@ -1,6 +0,0 @@ -// Test that combination of justification and hanging indent doesn't result in -// an underfull first line. - ---- -#set par(hanging-indent: 2.5cm, justify: true) -#lorem(5) diff --git a/tests/typ/bugs/label-fields-dict.typ b/tests/typ/bugs/label-fields-dict.typ deleted file mode 100644 index 05c7006a..00000000 --- a/tests/typ/bugs/label-fields-dict.typ +++ /dev/null @@ -1,31 +0,0 @@ -// Tests whether the label is accessible through the has, field, -// and fields accessors -// Ref: false - ---- -// Test whether the label is accessible through the has method -#show heading: it => { - assert(it.has("label")) - it -} - -= Hello, world! <my_label> - ---- -// Test whether the label is accessible through the field method -#show heading: it => { - assert(str(it.label) == "my_label") - it -} - -= Hello, world! <my_label> - ---- -// Test whether the label is accessible through the fields method -#show heading: it => { - assert("label" in it.fields()) - assert(str(it.fields().label) == "my_label") - it -} - -= Hello, world! <my_label> diff --git a/tests/typ/bugs/layout-infinite-lengths.typ b/tests/typ/bugs/layout-infinite-lengths.typ deleted file mode 100644 index 7fbc6216..00000000 --- a/tests/typ/bugs/layout-infinite-lengths.typ +++ /dev/null @@ -1,25 +0,0 @@ -// Test that passing infinite lengths to drawing primitives does not crash Typst. - ---- -#set page(width: auto, height: auto) - -// Error: 58-59 cannot expand into infinite width -#layout(size => grid(columns: (size.width, size.height))[a][b][c][d]) - ---- -#set page(width: auto, height: auto) - -// Error: 17-66 cannot create grid with infinite height -#layout(size => grid(rows: (size.width, size.height))[a][b][c][d]) - ---- -#set page(width: auto, height: auto) - -// Error: 17-41 cannot create line with infinite length -#layout(size => line(length: size.width)) - ---- -#set page(width: auto, height: auto) - -// Error: 17-54 cannot create polygon with infinite size -#layout(size => polygon((0pt,0pt), (0pt, size.width))) diff --git a/tests/typ/bugs/line-align.typ b/tests/typ/bugs/line-align.typ deleted file mode 100644 index 0518eaaa..00000000 --- a/tests/typ/bugs/line-align.typ +++ /dev/null @@ -1,5 +0,0 @@ -// Test right-aligning a line and a rectangle. - ---- -#align(right, line(length: 30%)) -#align(right, rect()) diff --git a/tests/typ/bugs/linebreak-no-justifiables.typ b/tests/typ/bugs/linebreak-no-justifiables.typ deleted file mode 100644 index ab1b2732..00000000 --- a/tests/typ/bugs/linebreak-no-justifiables.typ +++ /dev/null @@ -1,5 +0,0 @@ -// Test breaking a line without justifiables. - ---- -#set par(justify: true) -#block(width: 1cm, fill: aqua, lorem(2)) diff --git a/tests/typ/bugs/mat-aug-color.typ b/tests/typ/bugs/mat-aug-color.typ deleted file mode 100644 index c2e617d6..00000000 --- a/tests/typ/bugs/mat-aug-color.typ +++ /dev/null @@ -1,9 +0,0 @@ -// https://github.com/typst/typst/issues/2268 -// The augment line should be of the same color as the text -#set text( - font: "New Computer Modern", - lang: "en", - fill: yellow, -) - -$mat(augment: #1, M, v) arrow.r.squiggly mat(augment: #1, R, b)$ diff --git a/tests/typ/bugs/math-eval.typ b/tests/typ/bugs/math-eval.typ deleted file mode 100644 index 31450b8d..00000000 --- a/tests/typ/bugs/math-eval.typ +++ /dev/null @@ -1,5 +0,0 @@ -// Evaluating a math expr should renders the same as an equation - -#eval(mode: "math", "f(a) = cases(a + b\, space space x >= 3,a + b\, space space x = 5)") - -$f(a) = cases(a + b\, space space x >= 3,a + b\, space space x = 5)$ diff --git a/tests/typ/bugs/math-number-spacing.typ b/tests/typ/bugs/math-number-spacing.typ deleted file mode 100644 index 9450caca..00000000 --- a/tests/typ/bugs/math-number-spacing.typ +++ /dev/null @@ -1,9 +0,0 @@ -// Test spacing after numbers in math. - ---- -$ -10degree \ -10 degree \ -10.1degree \ -10.1 degree -$ diff --git a/tests/typ/bugs/math-realize.typ b/tests/typ/bugs/math-realize.typ deleted file mode 100644 index 10d8b78e..00000000 --- a/tests/typ/bugs/math-realize.typ +++ /dev/null @@ -1,47 +0,0 @@ -// Test that content in math can be realized without breaking -// nested equations. - ---- -#let my = $pi$ -#let f1 = box(baseline: 10pt, [f]) -#let f2 = context f1 -#show math.vec: [nope] - -$ pi a $ -$ my a $ -$ 1 + sqrt(x/2) + sqrt(#hide($x/2$)) $ -$ a x #link("url", $+ b$) $ -$ f f1 f2 $ -$ vec(1,2) * 2 $ - ---- -$ x^2 #hide[$(>= phi.alt) union y^2 0$] z^2 $ -Hello #hide[there $x$] -and #hide[$ f(x) := x^2 $] - ---- -// Test equations can embed equation pieces built by functions -#let foo(v1, v2) = { - // Return an equation piece that would've been rendered in - // inline style if the piece is not embedded - $v1 v2^2$ -} -#let bar(v1, v2) = { - // Return an equation piece that would've been rendered in - // block style if the piece is not embedded - $ v1 v2^2 $ -} -#let baz(..sink) = { - // Return an equation piece built by joining arrays - sink.pos().map(x => $hat(#x)$).join(sym.and) -} - -Inline $2 foo(alpha, (M+foo(a, b)))$. - -Inline $2 bar(alpha, (M+foo(a, b)))$. - -Inline $2 baz(x,y,baz(u, v))$. - -$ 2 foo(alpha, (M+foo(a, b))) $ -$ 2 bar(alpha, (M+foo(a, b))) $ -$ 2 baz(x,y,baz(u, v)) $ diff --git a/tests/typ/bugs/math-shift.typ b/tests/typ/bugs/math-shift.typ deleted file mode 100644 index 4a833e31..00000000 --- a/tests/typ/bugs/math-shift.typ +++ /dev/null @@ -1,5 +0,0 @@ -// https://github.com/typst/typst/issues/2214 -// The math content should also be affected by the TextElem baseline. - -hello #text(baseline: -5pt)[123 #sym.WW\orld]\ -hello #text(baseline: -5pt)[$123 WW#text[or]$ld]\ diff --git a/tests/typ/bugs/math-text-break.typ b/tests/typ/bugs/math-text-break.typ deleted file mode 100644 index a8aa1d0a..00000000 --- a/tests/typ/bugs/math-text-break.typ +++ /dev/null @@ -1,4 +0,0 @@ -// Test text with linebreaks in math. - ---- -$ x := "a\nb\nc\nd\ne" $ diff --git a/tests/typ/bugs/measure-image.typ b/tests/typ/bugs/measure-image.typ deleted file mode 100644 index bd8703b3..00000000 --- a/tests/typ/bugs/measure-image.typ +++ /dev/null @@ -1,8 +0,0 @@ -// Test that image measurement doesn't turn `inf / some-value` into 0pt. -// Ref: false - ---- -#context { - let size = measure(image("/assets/images/tiger.jpg")) - test(size, (width: 1024pt, height: 670pt)) -} diff --git a/tests/typ/bugs/new-cm-svg.typ b/tests/typ/bugs/new-cm-svg.typ deleted file mode 100644 index eeafcbbd..00000000 --- a/tests/typ/bugs/new-cm-svg.typ +++ /dev/null @@ -1,2 +0,0 @@ -#set text(font: "New Computer Modern") -#image("/assets/images/diagram.svg") diff --git a/tests/typ/bugs/newline-mode.typ b/tests/typ/bugs/newline-mode.typ deleted file mode 100644 index 04333cc5..00000000 --- a/tests/typ/bugs/newline-mode.typ +++ /dev/null @@ -1,84 +0,0 @@ -// Test newline continuations. - ---- -#{ - "hello" - .clusters() - if false { - - } - else { - ("1", "2") - } -} - ---- -#"hello" - .codepoints() - -#if false { - -} -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") diff --git a/tests/typ/bugs/pagebreak-bibliography.typ b/tests/typ/bugs/pagebreak-bibliography.typ deleted file mode 100644 index 257043a3..00000000 --- a/tests/typ/bugs/pagebreak-bibliography.typ +++ /dev/null @@ -1,5 +0,0 @@ -// Test weak pagebreak before bibliography. - ---- -#pagebreak(weak: true) -#bibliography("/assets/bib/works.bib") diff --git a/tests/typ/bugs/pagebreak-numbering.typ b/tests/typ/bugs/pagebreak-numbering.typ deleted file mode 100644 index a9fae3e4..00000000 --- a/tests/typ/bugs/pagebreak-numbering.typ +++ /dev/null @@ -1,12 +0,0 @@ -// https://github.com/typst/typst/issues/2095 -// The empty page 2 should not have a page number - -#set page(numbering: none) -This and next page should not be numbered - -#pagebreak(weak: true, to: "odd") - -#set page(numbering: "1") -#counter(page).update(1) - -This page should diff --git a/tests/typ/bugs/pagebreak-set-style.typ b/tests/typ/bugs/pagebreak-set-style.typ deleted file mode 100644 index 1ac24652..00000000 --- a/tests/typ/bugs/pagebreak-set-style.typ +++ /dev/null @@ -1,12 +0,0 @@ -// https://github.com/typst/typst/issues/2162 -// The styles should not be applied to the pagebreak empty page, -// it should only be applied after that. - -#pagebreak(to: "even") // We should now skip to page 2 - -Some text on page 2 - -#pagebreak(to: "even") // We should now skip to page 4 - -#set page(fill: orange) // This sets the color of the page starting from page 4 -Some text on page 4 diff --git a/tests/typ/bugs/parameter-pattern.typ b/tests/typ/bugs/parameter-pattern.typ deleted file mode 100644 index 31b07f2c..00000000 --- a/tests/typ/bugs/parameter-pattern.typ +++ /dev/null @@ -1,5 +0,0 @@ -// Test that underscore works in parameter patterns. -// Ref: false - ---- -#test((1, 2, 3).zip((1, 2, 3)).map(((_, x)) => x), (1, 2, 3)) diff --git a/tests/typ/bugs/parenthesized.typ b/tests/typ/bugs/parenthesized.typ deleted file mode 100644 index f8f3190f..00000000 --- a/tests/typ/bugs/parenthesized.typ +++ /dev/null @@ -1,98 +0,0 @@ -// Ref: false -// Test bugs related to destructuring and parenthesized parsing. - ---- -// https://github.com/typst/typst/issues/1338 -#let foo = "foo" -#let bar = "bar" -// Error: 8-9 expected expression, found underscore -// Error: 16-17 expected expression, found underscore -#(foo: _, bar: _) - ---- -// https://github.com/typst/typst/issues/1342 -// Error: 5-8 expected named or keyed pair, found identifier -// Error: 10-13 expected named or keyed pair, found identifier -#(: foo, bar) - ---- -// https://github.com/typst/typst/issues/1351 -// Error: 17-22 expected pattern, found string -#let foo((test: "bar")) = {} - ---- -// https://github.com/typst/typst/issues/3014 -// Error: 8-17 expected expression, found named pair -#(box, fill: red) - ---- -// https://github.com/typst/typst/issues/3144 -#let f(a: 10) = a(1) + 1 -#test(f(a: _ => 5), 6) - ---- -// Error: 17-20 missing argument: pattern parameter -#let f(a: 10) = a() + 1 -#f(a: _ => 5) - ---- -// This wasn't allowed. -#let ((x)) = 1 -#test(x, 1) - ---- -// This also wasn't allowed. -#let ((a, b)) = (1, 2) -#test(a, 1) -#test(b, 2) - ---- -// This was unintentionally allowed ... -// Error: 9 expected equals sign -#let (a) - ---- -// ... where this wasn't. -// Error: 12 expected equals sign -#let (a, b) - ---- -// This wasn't allowed before the bug fix ... -#let f(..) = {} -#f(arg: 1) - ---- -// ... but this was. -#let f(..x) = {} -#f(arg: 1) - ---- -// Here, `best` was accessed as a variable, where it shouldn't have. -#{ - (best: _) = (best: "brr") -} - ---- -// Same here. -#{ - let array = (1, 2, 3, 4) - (test: array.at(1), best: _) = (test: "baz", best: "brr") - test(array, (1, "baz", 3, 4)) -} - ---- -// Here, `a` is not duplicate, where it was previously identified as one. -#let f((a: b), (c,), a) = (a, b, c) -#test(f((a: 1), (2,), 3), (3, 1, 2)) - ---- -// Ensure that we can't have non-atomic closures. -#let x = 1 -#let c = [#(x) => (1, 2)] -#test(c.children.last(), [(1, 2)])) - ---- -// Ensure that we can't have non-atomic destructuring. -#let x = 1 -#let c = [#() = ()] -#test(c.children.last(), [()]) diff --git a/tests/typ/bugs/place-base.typ b/tests/typ/bugs/place-base.typ deleted file mode 100644 index 4a0bd029..00000000 --- a/tests/typ/bugs/place-base.typ +++ /dev/null @@ -1,7 +0,0 @@ -// Test that placement is relative to container and not itself. - ---- -#set page(height: 80pt, margin: 0pt) -#place(right, dx: -70%, dy: 20%, [First]) -#place(left, dx: 20%, dy: 60%, [Second]) -#place(center + horizon, dx: 25%, dy: 25%, [Third]) diff --git a/tests/typ/bugs/place-pagebreak.typ b/tests/typ/bugs/place-pagebreak.typ deleted file mode 100644 index bc04af1a..00000000 --- a/tests/typ/bugs/place-pagebreak.typ +++ /dev/null @@ -1,7 +0,0 @@ -// Test placing on an already full page. -// It shouldn't result in a page break. - ---- -#set page(height: 40pt) -#block(height: 100%) -#place(bottom + right)[Hello world] diff --git a/tests/typ/bugs/place-spacing.typ b/tests/typ/bugs/place-spacing.typ deleted file mode 100644 index 4d7b5fe3..00000000 --- a/tests/typ/bugs/place-spacing.typ +++ /dev/null @@ -1,15 +0,0 @@ -// Test that placed elements don't add extra block spacing. - ---- -#show figure: set block(spacing: 4em) - -Paragraph before float. -#figure(rect(), placement: bottom) -Paragraph after float. - ---- -#show place: set block(spacing: 4em) - -Paragraph before place. -#place(rect()) -Paragraph after place. diff --git a/tests/typ/bugs/raw-color-overwrite.typ b/tests/typ/bugs/raw-color-overwrite.typ deleted file mode 100644 index ec306ef1..00000000 --- a/tests/typ/bugs/raw-color-overwrite.typ +++ /dev/null @@ -1,13 +0,0 @@ -// Test that the color of a raw block is not overwritten - ---- - -#show raw: set text(fill: blue) - -`Hello, World!` - -```rs -fn main() { - println!("Hello, World!"); -} -```
\ No newline at end of file diff --git a/tests/typ/bugs/smartquotes-in-outline.typ b/tests/typ/bugs/smartquotes-in-outline.typ deleted file mode 100644 index 1ecfcdc4..00000000 --- a/tests/typ/bugs/smartquotes-in-outline.typ +++ /dev/null @@ -1,4 +0,0 @@ -#set page(width: 15em) -#outline() - -= "This" "is" "a" "test" diff --git a/tests/typ/bugs/smartquotes-on-newline.typ b/tests/typ/bugs/smartquotes-on-newline.typ deleted file mode 100644 index 3180350e..00000000 --- a/tests/typ/bugs/smartquotes-on-newline.typ +++ /dev/null @@ -1,7 +0,0 @@ -// Test that smart quotes are inferred correctly across newlines. - ---- -"test"#linebreak()"test" - -"test"\ -"test" diff --git a/tests/typ/bugs/spacing-behaviour.typ b/tests/typ/bugs/spacing-behaviour.typ deleted file mode 100644 index a2a30b8a..00000000 --- a/tests/typ/bugs/spacing-behaviour.typ +++ /dev/null @@ -1,9 +0,0 @@ -// Test that metadata after spacing does not force a new paragraph. - ---- -#{ - h(1em) - counter(heading).update(4) - [Hello ] - counter(heading).display() -} diff --git a/tests/typ/bugs/square-base.typ b/tests/typ/bugs/square-base.typ deleted file mode 100644 index d8339c1a..00000000 --- a/tests/typ/bugs/square-base.typ +++ /dev/null @@ -1,5 +0,0 @@ -// Test that square sets correct base for its content. - ---- -#set page(height: 80pt) -#square(width: 40%, rect(width: 60%, height: 80%)) diff --git a/tests/typ/bugs/subelement-panic.typ b/tests/typ/bugs/subelement-panic.typ deleted file mode 100644 index fcad83bc..00000000 --- a/tests/typ/bugs/subelement-panic.typ +++ /dev/null @@ -1,40 +0,0 @@ -// Test that figure captions don't cause panics. -// Ref: false - ---- -// #2530 -#figure(caption: [test])[].caption - ---- -// #2165 -#figure.caption[] - ---- -// #2328 -// Error: 4-43 footnote entry must have a location -// Hint: 4-43 try using a query or a show rule to customize the footnote instead -HI#footnote.entry(clearance: 2.5em)[There] - ---- -// Enum item (pre-emptive) -#enum.item(none)[Hello] -#enum.item(17)[Hello] - ---- -// List item (pre-emptive) -#list.item[Hello] - ---- -// Term item (pre-emptive) -#terms.item[Hello][World!] - ---- -// Outline entry (pre-emptive) -// Error: 2-48 cannot outline text -#outline.entry(1, [Hello], [World!], none, [1]) - ---- -// Outline entry (pre-emptive, improved error) -// Error: 2-55 heading must have a location -// Hint: 2-55 try using a query or a show rule to customize the outline.entry instead -#outline.entry(1, heading[Hello], [World!], none, [1]) diff --git a/tests/typ/bugs/table-lines.typ b/tests/typ/bugs/table-lines.typ deleted file mode 100644 index 7e954012..00000000 --- a/tests/typ/bugs/table-lines.typ +++ /dev/null @@ -1,10 +0,0 @@ -// Ensure no empty lines before a table that doesn't fit into the first page. - ---- -#set page(height: 50pt) - -Hello -#table( - columns: 4, - [1], [2], [3], [4] -) diff --git a/tests/typ/bugs/table-row-missing.typ b/tests/typ/bugs/table-row-missing.typ deleted file mode 100644 index d72305ba..00000000 --- a/tests/typ/bugs/table-row-missing.typ +++ /dev/null @@ -1,8 +0,0 @@ -// Test that a table row isn't wrongly treated like a gutter row. - ---- -#set page(height: 70pt) -#table( - rows: 16pt, - ..range(6).map(str).flatten(), -) |
