summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-12-17 10:25:15 +0100
committerGitHub <noreply@github.com>2024-12-17 09:25:15 +0000
commited67220e4b5ae6b3a1bc50f59bd52b5b1dea3a6b (patch)
treed27d36e3707e2339af4f55bf514a95e3d0cd3971 /tests
parent51020fcf3cd6fbe62d148d2188b9aaac4445bf63 (diff)
Remove deprecated things and compatibility behaviours (#5591)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/context-compatibility-locate.pngbin1523 -> 0 bytes
-rw-r--r--tests/ref/context-compatibility-styling.pngbin380 -> 0 bytes
-rw-r--r--tests/ref/outline-indent-no-numbering.pngbin4654 -> 2924 bytes
-rw-r--r--tests/ref/outline-indent-numbering.pngbin10607 -> 7101 bytes
-rw-r--r--tests/suite/foundations/context.typ40
-rw-r--r--tests/suite/foundations/type.typ8
-rw-r--r--tests/suite/model/outline.typ4
-rw-r--r--tests/suite/styling/fold.typ12
8 files changed, 4 insertions, 60 deletions
diff --git a/tests/ref/context-compatibility-locate.png b/tests/ref/context-compatibility-locate.png
deleted file mode 100644
index 9a78d3eb..00000000
--- a/tests/ref/context-compatibility-locate.png
+++ /dev/null
Binary files differ
diff --git a/tests/ref/context-compatibility-styling.png b/tests/ref/context-compatibility-styling.png
deleted file mode 100644
index aee16c3a..00000000
--- a/tests/ref/context-compatibility-styling.png
+++ /dev/null
Binary files differ
diff --git a/tests/ref/outline-indent-no-numbering.png b/tests/ref/outline-indent-no-numbering.png
index d074dfef..7c3a0ec0 100644
--- a/tests/ref/outline-indent-no-numbering.png
+++ b/tests/ref/outline-indent-no-numbering.png
Binary files differ
diff --git a/tests/ref/outline-indent-numbering.png b/tests/ref/outline-indent-numbering.png
index 3d0dcb07..e3195f76 100644
--- a/tests/ref/outline-indent-numbering.png
+++ b/tests/ref/outline-indent-numbering.png
Binary files differ
diff --git a/tests/suite/foundations/context.typ b/tests/suite/foundations/context.typ
index 9ed31757..e506d50d 100644
--- a/tests/suite/foundations/context.typ
+++ b/tests/suite/foundations/context.typ
@@ -37,46 +37,6 @@
// Error: 11-12 variables from outside the context expression are read-only and cannot be modified
#context (i = 1)
---- context-compatibility-locate ---
-#let s = state("x", 0)
-#let compute(expr) = [
- #s.update(x =>
- eval(expr.replace("x", str(x)))
- )
- // Warning: 17-28 `state.display` is deprecated
- // Hint: 17-28 use `state.get` in a `context` expression instead
- New value is #s.display().
-]
-
-// Warning: 1:2-6:3 `locate` with callback function is deprecated
-// Hint: 1:2-6:3 use a `context` expression instead
-#locate(loc => {
- // Warning: 14-32 calling `query` with a location is deprecated
- // Hint: 14-32 try removing the location argument
- let elem = query(<here>, loc).first()
- test(s.at(elem.location()), 13)
-})
-
-#compute("10") \
-#compute("x + 3") \
-*Here.* <here> \
-#compute("x * 2") \
-#compute("x - 5")
-
---- context-compatibility-styling ---
-// Warning: 2-53 `style` is deprecated
-// Hint: 2-53 use a `context` expression instead
-// Warning: 18-39 calling `measure` with a styles argument is deprecated
-// Hint: 18-39 try removing the styles argument
-#style(styles => measure([it], styles).width < 20pt)
-
---- context-compatibility-counter-display ---
-#counter(heading).update(10)
-
-// Warning: 2-44 `counter.display` without context is deprecated
-// Hint: 2-44 use it in a `context` expression instead
-#counter(heading).display(n => test(n, 10))
-
--- context-delayed-warning ---
// Ensure that the warning that triggers in the first layout iteration is not
// surfaced since it goes away in the second one. Just like errors in show
diff --git a/tests/suite/foundations/type.typ b/tests/suite/foundations/type.typ
index 6ab4be4f..068b858d 100644
--- a/tests/suite/foundations/type.typ
+++ b/tests/suite/foundations/type.typ
@@ -3,14 +3,6 @@
#test(type(ltr), direction)
#test(type(10 / 3), float)
---- type-string-compatibility ---
-#test(type(10), int)
-#test(type(10), "integer")
-#test("is " + type(10), "is integer")
-#test(int in ("integer", "string"), true)
-#test(int in "integers or strings", true)
-#test(str in "integers or strings", true)
-
--- issue-3110-type-constructor ---
// Let the error message report the type name.
// Error: 2-9 type content does not have a constructor
diff --git a/tests/suite/model/outline.typ b/tests/suite/model/outline.typ
index 18c61df8..a8426d6c 100644
--- a/tests/suite/model/outline.typ
+++ b/tests/suite/model/outline.typ
@@ -43,8 +43,6 @@ A
#set outline(fill: none)
#context test(outline.indent, none)
-#outline(indent: false)
-#outline(indent: true)
#outline(indent: none)
#outline(indent: auto)
#outline(indent: 2em)
@@ -62,8 +60,6 @@ A
#show heading: none
#set outline(fill: none)
-#outline(indent: false)
-#outline(indent: true)
#outline(indent: none)
#outline(indent: auto)
#outline(indent: n => 2em * n)
diff --git a/tests/suite/styling/fold.typ b/tests/suite/styling/fold.typ
index 4b77f9d5..104d3d1a 100644
--- a/tests/suite/styling/fold.typ
+++ b/tests/suite/styling/fold.typ
@@ -13,12 +13,8 @@ fi
#let c = counter("mycounter")
#c.update(1)
-// Warning: 1:2-7:3 `locate` with callback function is deprecated
-// Hint: 1:2-7:3 use a `context` expression instead
-#locate(loc => [
+#context [
#c.update(2)
- #c.at(loc) \
- // Warning: 12-36 `locate` with callback function is deprecated
- // Hint: 12-36 use a `context` expression instead
- Second: #locate(loc => c.at(loc))
-])
+ #c.get() \
+ Second: #context c.get()
+]