summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-08-28 10:21:21 +0200
committerGitHub <noreply@github.com>2024-08-28 08:21:21 +0000
commitef4482ce4b084aa97155dbde89f02dda3f7fb219 (patch)
tree723fdac6b85dcc2a95d7e88984c14dfefe7e829d /tests
parent4e4c5175e531d99ec6f39d9a77d59d02f2109308 (diff)
Better smartquotes (#4849)
Diffstat (limited to 'tests')
-rw-r--r--tests/ref/smartquote-bracket.pngbin0 -> 563 bytes
-rw-r--r--tests/ref/smartquote-close-before-letter.pngbin0 -> 614 bytes
-rw-r--r--tests/ref/smartquote-escape.pngbin1307 -> 1306 bytes
-rw-r--r--tests/ref/smartquote-prime.pngbin0 -> 742 bytes
-rw-r--r--tests/ref/smartquote-slash.pngbin0 -> 1243 bytes
-rw-r--r--tests/suite/text/smartquote.typ23
6 files changed, 22 insertions, 1 deletions
diff --git a/tests/ref/smartquote-bracket.png b/tests/ref/smartquote-bracket.png
new file mode 100644
index 00000000..7efcccf8
--- /dev/null
+++ b/tests/ref/smartquote-bracket.png
Binary files differ
diff --git a/tests/ref/smartquote-close-before-letter.png b/tests/ref/smartquote-close-before-letter.png
new file mode 100644
index 00000000..8061c12a
--- /dev/null
+++ b/tests/ref/smartquote-close-before-letter.png
Binary files differ
diff --git a/tests/ref/smartquote-escape.png b/tests/ref/smartquote-escape.png
index 45d8f602..ea4aef9c 100644
--- a/tests/ref/smartquote-escape.png
+++ b/tests/ref/smartquote-escape.png
Binary files differ
diff --git a/tests/ref/smartquote-prime.png b/tests/ref/smartquote-prime.png
new file mode 100644
index 00000000..35c37612
--- /dev/null
+++ b/tests/ref/smartquote-prime.png
Binary files differ
diff --git a/tests/ref/smartquote-slash.png b/tests/ref/smartquote-slash.png
new file mode 100644
index 00000000..925f28e6
--- /dev/null
+++ b/tests/ref/smartquote-slash.png
Binary files differ
diff --git a/tests/suite/text/smartquote.typ b/tests/suite/text/smartquote.typ
index 4c27be07..a69ad25c 100644
--- a/tests/suite/text/smartquote.typ
+++ b/tests/suite/text/smartquote.typ
@@ -56,7 +56,28 @@ He said "I'm a big fella."
--- smartquote-escape ---
// Test escape sequences.
-The 5\'11\" 'quick\' brown fox jumps over the \"lazy" dog\'s ear.
+The 5\'11\" 'quick\' brown fox jumps over the \"lazy' dog\'s ear.
+
+--- smartquote-slash ---
+// Test that smartquotes can open before non-whitespace if not nested.
+"Hello"/"World" \
+'"Hello"/"World"' \
+""Hello"/"World""
+
+--- smartquote-close-before-letter ---
+// Test that smartquotes can close before alphabetic letters.
+Straight "A"s and "B"s
+
+--- smartquote-prime ---
+// Test that primes result after numbers when possible.
+A 2" nail. \
+'A 2" nail.' \
+"A 2" nail."
+
+--- smartquote-bracket ---
+// Test that brackets indicate an opening quote.
+"a ["b"] c" \
+"a b"c"d e"
--- smartquote-disable ---
// Test turning smart quotes off.