diff options
| author | Ian Wrzesinski <133046678+wrzian@users.noreply.github.com> | 2024-12-11 06:33:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-11 11:33:59 +0000 |
| commit | 5e0e58d26ef656836aae8d16477bb059e97883a3 (patch) | |
| tree | 3b6ffd73b9b5156573a38b8937f09c9128e50e97 /tests/suite/layout/length.typ | |
| parent | ef4fc040b279104f6c95a5ea2f9a9d10fb0e9019 (diff) | |
Add number-syntax edge case tests (#5560)
Diffstat (limited to 'tests/suite/layout/length.typ')
| -rw-r--r-- | tests/suite/layout/length.typ | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/suite/layout/length.typ b/tests/suite/layout/length.typ index 71d79da9..3409614f 100644 --- a/tests/suite/layout/length.typ +++ b/tests/suite/layout/length.typ @@ -79,3 +79,30 @@ // Error: 2-9 invalid base-2 prefix // Hint: 2-9 numbers with a unit cannot have a base prefix #0b100pt + +--- number-syntax-edge-cases --- +// Test numeric syntax edge cases with suffixes and which spans of text are +// highlighted. Valid items are those not annotated with an error comment since +// syntax is handled at parse time. + +// All fine +#2em +#6.3e5em +#.5pt +#1.2E+0% +#1.2e-0% +#0.0e0deg +#5in% +#0.% +// Error: 2-8 invalid number suffix: hello +#1hello +// Error: 2-7 invalid number suffix: infr +#1infr +// Error: 2-5 invalid number: 2E +#2EM +// Error: 2-8 invalid number: .1E- +#.1E-fr +// Error: 2-16 invalid number: 0.1E+ +#0.1E+fr123e456 +// Error: 2-11 invalid number: .1e- +#.1e-fr123.456 |
