From 5aaaacbf472fc71295d4e4a26615d941a4d92a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20d=27Herbais=20de=20Thun?= Date: Fri, 17 Nov 2023 10:39:08 +0100 Subject: Allow `elem` synthesized fields to take a default value (#2687) --- tests/typ/bugs/subelement-panic.typ | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tests/typ/bugs/subelement-panic.typ (limited to 'tests') diff --git a/tests/typ/bugs/subelement-panic.typ b/tests/typ/bugs/subelement-panic.typ new file mode 100644 index 00000000..fcad83bc --- /dev/null +++ b/tests/typ/bugs/subelement-panic.typ @@ -0,0 +1,40 @@ +// 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]) -- cgit v1.2.3