From bdb1c008f2cee7c3929b671d9407d2b578182199 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 2 Feb 2022 11:28:31 +0100 Subject: Allow set & show only directly in markup --- tests/typ/style/set-block.typ | 10 ---------- tests/typ/style/set.typ | 5 +++++ tests/typ/style/show.typ | 5 ++++- 3 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 tests/typ/style/set-block.typ create mode 100644 tests/typ/style/set.typ (limited to 'tests/typ') diff --git a/tests/typ/style/set-block.typ b/tests/typ/style/set-block.typ deleted file mode 100644 index f260acdc..00000000 --- a/tests/typ/style/set-block.typ +++ /dev/null @@ -1,10 +0,0 @@ -// Test set in code blocks. - ---- -// Test that template in block is not affected by set -// rule in block ... -A{set text(fill: eastern); [B]}C - ---- -// ... no matter the order. -A{[B]; set text(fill: eastern)}C diff --git a/tests/typ/style/set.typ b/tests/typ/style/set.typ new file mode 100644 index 00000000..0d4d47cc --- /dev/null +++ b/tests/typ/style/set.typ @@ -0,0 +1,5 @@ +// General tests for set. + +--- +// Error: 2-10 set is only allowed directly in markup +{set f(x)} diff --git a/tests/typ/style/show.typ b/tests/typ/style/show.typ index 42a35f27..533e50f5 100644 --- a/tests/typ/style/show.typ +++ b/tests/typ/style/show.typ @@ -1,6 +1,9 @@ // Test show rules. -// Ref: false --- // Error: 1-34 show rules are not yet implemented #show heading(body) as [*{body}*] + +--- +// Error: 2-15 show is only allowed directly in markup +{show (a) as b} -- cgit v1.2.3