Giter Club home page Giter Club logo

Comments (6)

arp242 avatar arp242 commented on September 28, 2024 2

Yeah, what @eksortso said.

Some tests only apply to specific versions; there's a list in https://github.com/BurntSushi/toml-test/blob/master/version.go

By default only the 1.0 tests are run with toml-test; you need to use toml-test -toml next to select the newer version. If you don't use the toml-test binary you'll need to duplicate that.

Maybe the filenames should be updated to make this more obvious as this confusion has come up before and it will only become more confusing as TOML 1.1, 1.2, etc. get released in the future.

I don't know what the plans will be for the invalid tests in the future, but one way or another, they'll be gone.

The general idea is to remain compatible with all TOML versions whenever possible, since many libraries tend to be fairly slow in updating. In hindsight I should have done this when I updated this from 0.4 to 1.0 since it caused me some pain. Live and learn.

from toml-test.

eksortso avatar eksortso commented on September 28, 2024 1

Times without seconds were invalid in TOML v1.0.0. But they are now valid, as of PR 894 of toml-lang/toml, so they will be valid when the first RC of TOML v1.1.0 is released. I don't know what the plans will be for the invalid tests in the future, but one way or another, they'll be gone.

from toml-test.

arp242 avatar arp242 commented on September 28, 2024 1

The issue is that I would prefer the filenames to remain stable, so people can skip them and safely update toml-test without worrying about which tests moved around. In the own TOML parser I maintain I skip some minor things because they're fairly hard to fix and, IMHO, not worth the bother.

On the other hand, by adding new TOML 1.1 tests also means people can't safely update, since TOML 1.0 parsers will break.

I'm not 100% sure yet how to best handle this; I will reopen this issue as a reminder that something needs to be done.

from toml-test.

erbsland-dev avatar erbsland-dev commented on September 28, 2024

Adding the version in the filenames would be great. I am integrating the test files directly into the unit test for the parser (will be published soon), as I try to have as little dependencies possible.

from toml-test.

erbsland-dev avatar erbsland-dev commented on September 28, 2024

What about adding a version.json file that contains the arrays with included/excluded files?
It would allow to update the test files without altering the test application.

from toml-test.

arp242 avatar arp242 commented on September 28, 2024

Yeah, that's probably the best solution.

I added a new -list-files flag which will list all the test files for the given -toml flag; it's just one-file-per-line rather than JSON, which is a bit easier to use if you want to copy all the files from the CLI and such.

To make things easier for other people I also added a pre-generated tests/files-toml-1.0.0 and tests/files-toml-1.1.0 which contains the output of that so people don't need to run toml-test themselves.

from toml-test.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.