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/foundations/float.typ | |
| parent | ef4fc040b279104f6c95a5ea2f9a9d10fb0e9019 (diff) | |
Add number-syntax edge case tests (#5560)
Diffstat (limited to 'tests/suite/foundations/float.typ')
| -rw-r--r-- | tests/suite/foundations/float.typ | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/suite/foundations/float.typ b/tests/suite/foundations/float.typ index 716ecd6b..a18e9f09 100644 --- a/tests/suite/foundations/float.typ +++ b/tests/suite/foundations/float.typ @@ -95,3 +95,23 @@ #float.inf \ #(-float.inf) \ #float.nan + +--- float-syntax-edge-cases --- +// Test float syntax edge cases and which spans of text are highlighted. Valid +// items are those not annotated with an error comment since syntax is handled +// at parse time. + +#123.456e+789 +#000.000E-000 +#.9e0 +#123.E // this is a field access, so is fine syntactically +#0.e +#1.E+020 +// Error: 2-10 invalid number: 123.456e +#123.456e +// Error: 2-11 invalid number: 123.456e+ +#123.456e+ +// Error: 2-6 invalid number: .1E- +#.1E- +// Error: 2-4 invalid number: 0e +#0e |
