diff options
| author | MALO <57839069+MDLC01@users.noreply.github.com> | 2023-10-09 15:30:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-09 15:30:40 +0200 |
| commit | 0804a9e25d865dc25d10aae22b0a39c4e16cab19 (patch) | |
| tree | 80550c88a91238e8018ccfb89aae891a7e4c368c /tests/typ/text | |
| parent | df49d3f0c6ea17e9dcf552106f7b5464bc99c4dc (diff) | |
Use/allow U+2212 MINUS SIGN instead of U+002D HYPHEN MINUS everywhere (#2318)
Diffstat (limited to 'tests/typ/text')
| -rw-r--r-- | tests/typ/text/numbers.typ | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/tests/typ/text/numbers.typ b/tests/typ/text/numbers.typ new file mode 100644 index 00000000..a35798d1 --- /dev/null +++ b/tests/typ/text/numbers.typ @@ -0,0 +1,110 @@ +// Test how numbers are displayed. + +--- +// Test numbers in text mode. +12 \ +12.0 \ +3.14 \ +1234567890 \ +0123456789 \ +0 \ +0.0 \ ++0 \ ++0.0 \ +-0 \ +-0.0 \ +-1 \ +-3.14 \ +-9876543210 \ +-0987654321 \ +٣٫١٤ \ +-٣٫١٤ \ +-¾ \ +#text(fractions: true)[-3/2] \ +2022 - 2023 \ +2022 -- 2023 \ +2022--2023 \ +2022-2023 \ +٢٠٢٢ - ٢٠٢٣ \ +٢٠٢٢ -- ٢٠٢٣ \ +٢٠٢٢--٢٠٢٣ \ +٢٠٢٢-٢٠٢٣ \ +-500 -- -400 + +--- +// Test integers. +#12 \ +#1234567890 \ +#0123456789 \ +#0 \ +#(-0) \ +#(-1) \ +#(-9876543210) \ +#(-0987654321) \ +#(4 - 8) + +--- +// Test floats. +#12.0 \ +#3.14 \ +#1234567890.0 \ +#0123456789.0 \ +#0.0 \ +#(-0.0) \ +#(-1.0) \ +#(-9876543210.0) \ +#(-0987654321.0) \ +#(-3.14) \ +#(4.0 - 8.0) + +--- +// Test the `str` function with integers. +#str(12) \ +#str(1234567890) \ +#str(0123456789) \ +#str(0) \ +#str(-0) \ +#str(-1) \ +#str(-9876543210) \ +#str(-0987654321) \ +#str(4 - 8) + +--- +// Test the `str` function with floats. +#str(12.0) \ +#str(3.14) \ +#str(1234567890.0) \ +#str(0123456789.0) \ +#str(0.0) \ +#str(-0.0) \ +#str(-1.0) \ +#str(-9876543210.0) \ +#str(-0987654321.0) \ +#str(-3.14) \ +#str(4.0 - 8.0) + +--- +// Test the `repr` function with integers. +#repr(12) \ +#repr(1234567890) \ +#repr(0123456789) \ +#repr(0) \ +#repr(-0) \ +#repr(-1) \ +#repr(-9876543210) \ +#repr(-0987654321) \ +#repr(4 - 8) + +--- +// Test the `repr` function with floats. +#repr(12.0) \ +#repr(3.14) \ +#repr(1234567890.0) \ +#repr(0123456789.0) \ +#repr(0.0) \ +#repr(-0.0) \ +#repr(-1.0) \ +#repr(-9876543210.0) \ +#repr(-0987654321.0) \ +#repr(-3.14) \ +#repr(4.0 - 8.0) |
