Giter Site home page Giter Site logo

Proper Test Suite about taplo HOT 8 CLOSED

tamasfe avatar tamasfe commented on May 14, 2024
Proper Test Suite

from taplo.

Comments (8)

moorereason avatar moorereason commented on May 14, 2024 2

https://github.com/BurntSushi/toml-test has a new maintainer. It's been updated to TOML v1.0.0.

There's a simple command line tool used for testing the suite. I don't know jack about Rust, but I would love to see taplo provide a binary to work with the toml-test cmd.

from taplo.

tamasfe avatar tamasfe commented on May 14, 2024 1

@jasikpark thank you a lot! I'll look into these, we have some tests based on those 0.4.0 tests (and some 0.5.0) and bug reports, but tests are never enough.

from taplo.

tamasfe avatar tamasfe commented on May 14, 2024 1

toml-test can be used with taplo-cli from the master branch (cargo install --git=https://github.com/tamasfe/taplo.git --features toml-test taplo-cli and then toml-test taplo -- toml-test).

Unfortunately it is not part of the CI yet, and the cli has to be specifically built with the feature enabled, but I will include it in the next release by default as it barely adds anything to the final binary.

The results after the first run are not great, not terrible:

toml-test [taplo toml-test]: using embedded tests: 240 passed, 73 failed

As far as I see the causes of the failed tests roughly fall into three categories:

  • actual bugs
  • the parser being too permissive
  • wrong string escape sequences

The latter two are not all that relevant for IDE uses, but might be essential for people who use taplo to validate TOML files (e.g. in CI).

Additional test cases and reports are welcome, fixes are even more welcome!

from taplo.

jasikpark avatar jasikpark commented on May 14, 2024

https://github.com/bd82/toml-tools/tree/master/packages/prettier-plugin-toml might be useful - they use Burntsushi's TOML test suite I believe?

https://github.com/BurntSushi/toml-test

from taplo.

jasikpark avatar jasikpark commented on May 14, 2024

Oh lol that repo is in sync with TOML 0.4.0 nvm.

from taplo.

jasikpark avatar jasikpark commented on May 14, 2024

Probably not a bad idea for testing against 0.4.0 tho? IDK anything, I just really appreciate this project

from taplo.

jasikpark avatar jasikpark commented on May 14, 2024

https://github.com/iarna/toml-spec-tests - tests for TOML 0.5.0 😅

from taplo.

jasikpark avatar jasikpark commented on May 14, 2024

https://github.com/iarna/toml-spec-tests/tree/1.0.0-rc.1 aha!

from taplo.

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.