Comments (4)
That's actually a different issue @glguy, with the "I" in "Inf" being capitalized sometimes. That was fixed last year. I'm not 100% sure if that's in the latest tagged release (need to look that up), but it's definitely in the latest master.
Verified with:
% git log -n1
commit 4bcf07d (HEAD -> main, tag: toml-parser-2.0.0.0, origin/main, origin/HEAD)
Author: Eric Mertens <[email protected]>
Date: Sat Feb 24 08:27:42 2024 -0800
Use NonEmpty in lexer context stack
% git diff
diff --git i/test-drivers/encoder/Main.hs w/test-drivers/encoder/Main.hs
index 73998b2..e322d23 100644
--- i/test-drivers/encoder/Main.hs
+++ w/test-drivers/encoder/Main.hs
@@ -56,6 +56,6 @@ decodeValue "date-local" (lexValue -> Right (TokLocalDate x)) = pure (T
decodeValue "float" (lexValue -> Right (TokFloat x)) = pure (Toml.Double x)
decodeValue "float" (lexValue -> Right (TokInteger x)) = pure (Toml.Double (fromInteger x))
-- extra infinities as toml-tests are inconsistent
-decodeValue "float" "+Inf" = pure (Toml.Double (1/0))
-decodeValue "float" "-Inf" = pure (Toml.Double (-1/0))
+-- decodeValue "float" "+Inf" = pure (Toml.Double (1/0))
+-- decodeValue "float" "-Inf" = pure (Toml.Double (-1/0))
decodeValue _ _ = empty
% toml-test ./TomlDecoder
toml-test v2023-12-07 [./TomlDecoder]: using embedded tests
valid tests: 179 passed, 0 failed
invalid tests: 368 passed, 0 failed
% toml-test -encoder ./TomlEncoder
toml-test v2023-12-07 [./TomlEncoder]: using embedded tests
encoder tests: 179 passed, 0 failed
(I made sure to rebuild the TomlDecoder/TomlEncoder with the changes).
from toml-test.
Is this causing practical issues for you?
from toml-test.
I just wrote a parser for TOML for fun and found that it cannot pass these test suites.
from toml-test.
I had to add custom processing to my test program to account for the inconsistent way the test suite encodes infinities
https://github.com/glguy/toml-parser/blob/main/test-drivers/encoder/Main.hs#L59-L60
from toml-test.
Related Issues (20)
- Add tests for "Permit more control characters in comments"
- Contradicting tests `invalid/no-seconds.toml` and `valid/no-seconds.toml` HOT 6
- Millisecond truncation is incorrect HOT 1
- Millisecond decoder tests pass with second precision output HOT 1
- Transfer to the toml-lang organisation? HOT 7
- Split `invalid/float/trailing-us-exp.toml` into two tests HOT 5
- valid/table/array-one fails when using inline array and table HOT 2
- Consider adding some performance tests HOT 1
- Invalid Unicode Escapes HOT 4
- [Valid Tests] Add Extra Spaces in Inline Tables HOT 1
- Clarify if - is permitted as a starting character in bare keys (toml 1.0.0) HOT 1
- Add tests for newlines within an array nested in an inline table
- Add a test for oversized floating-point literals HOT 4
- `valid/integer/long` test does not seem relevant for specification compliance HOT 5
- Encoder tests expect submillisecond precision HOT 3
- Required int/float sizes implementations need to support? HOT 1
- Invalid JSON in example code HOT 2
- Should leap seconds be validated? HOT 2
- Debian 10 install fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toml-test.