summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/suite/foundations/decimal.typ7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/suite/foundations/decimal.typ b/tests/suite/foundations/decimal.typ
index d5fd9444..bae0d2e6 100644
--- a/tests/suite/foundations/decimal.typ
+++ b/tests/suite/foundations/decimal.typ
@@ -31,6 +31,13 @@
// Error: 10-19 float is not a valid decimal: float.nan
#decimal(float.nan)
+--- decimal-scale-is-observable ---
+// Ensure equal decimals with different scales produce different strings.
+#let f1(x) = str(x)
+#let f2(x) = f1(x)
+#test(f2(decimal("3.140")), "3.140")
+#test(f2(decimal("3.14000")), "3.14000")
+
--- decimal-repr ---
// Test the `repr` function with decimals.
#test(repr(decimal("12.0")), "decimal(\"12.0\")")