Commit Graph

26 Commits

Author SHA1 Message Date
Martin Tournoij fd8d0bf4d9 Add cmd/gotoml-test-encoder (#907) 2023-10-23 14:40:44 -06:00
Thomas Pelletier 67bc5422f3 Go 1.19 (#802) 2022-08-15 10:56:33 -04:00
Thomas Pelletier fb6d1d6c2b Marshal: define and fix newlines behavior when using omitempty (#798)
Ref #786
2022-07-24 15:40:20 -04:00
Thomas Pelletier f1391952d4 Update and move testsuite to internal package (#730)
* Regenerate test suite

* Move test suite to /internal
2021-12-31 18:52:26 -05:00
Thomas Pelletier 4a73a200ed Clean up tools godoc 2021-12-31 15:56:40 -05:00
Thomas Pelletier 4807229e94 tomll: port to v2 (#727)
Fixes #721
2021-12-31 15:40:18 -05:00
Thomas Pelletier d8ddc00c61 jsontoml: port to v2 (#726)
Fixes #719
2021-12-31 14:40:20 -05:00
Thomas Pelletier 82f8dad811 tomljson: port to v2 (#725) 2021-12-31 13:25:53 -05:00
Cameron Moore b4ec220f7e Update tomltestgen and regenerate tests (#645)
Remove testsuite build tag from generated tests file

Co-authored-by: Thomas Pelletier <thomas@pelletier.codes>
2021-10-28 20:46:08 -04:00
Cameron Moore d25eec183f gotoml-test-decoder: add toml-test decoder command (#619) 2021-10-14 08:14:34 -04:00
Cameron Moore 62acca2b68 tomltestgen: add toml-test unit test generation command (#610)
Tests are hidden behind a "testsuite" build tag for now since many tests
are failing.  Use `go test -tags testsuite` to activate.

Use `go generate` to regenerate toml_testgen_test.go.

Co-authored-by: Thomas Pelletier <thomas@pelletier.codes>
2021-10-03 22:15:30 -04:00
Thomas Pelletier b4bb91fc13 test 2021-01-30 09:07:55 -05:00
Thomas Pelletier b40204d36a Replace CIs by Github Actions (#294) 2019-09-09 19:44:45 -07:00
Gaurav Dhameeja 4d5afd743f jsontoml tool (#296)
`jsontoml` is very similar to `tomljson`
It uses json.Unmarshal to convert read json to map and then
converts the map to tree using `toml.TreeFromMap`.
Then this tree is converted to toml using `tree.toTomlString()`
The numbers when taken as input from json get converted to float64
because of how `json.Unmarshal()` converts all json numbers to float.

Fixes #280
2019-09-06 09:36:56 -07:00
Thomas Pelletier 405d48dc28 Port toml-test to pure Go (#264)
* Port toml-test to pure Go

This change basically ports the toml-test examples test suite to pure
Go. This removes the snowflake test.sh required to run such tests, and
allows us to the example tests on any platform (which includes Windows
as part of the pull-request testing).

* Allow CircleCI failure for go tip
2019-03-20 00:23:14 -07:00
Yang Luo 603baefff9 Fix path not found message on Windows (#227) 2018-07-03 11:33:37 -07:00
Cameron Moore 66540cf1fc Go 1.10 support (#223)
* Update Travis CI to use latest Go releases

* Fix go vet issues for Go 1.10

Starting in Go 1.10, the `go test` command now automatically runs `go
vet`. This commit fixes two issues flagged by vet that cause `go test`
to fail.

* Fix gofmt issue for Go 1.10

Go 1.10 introduced a small formatting change with comments in empty
multiline slice definitions.  This commit attempts to move the offending
comment in such a way that all version of gofmt will agree on its
location.

* Remove go-vet from test.sh

Starting in Go 1.10, the `go test` command automatically runs `go vet`,
so we don't need to run `go vet` explicitly from within test.sh.

Fixes #222
2018-03-23 11:52:43 -07:00
Thomas Pelletier 40ecdac242 Clean up documentation (#168)
Fixes #135
2017-05-30 18:33:25 -07:00
Thomas Pelletier 685a1f1cb7 Rename TomlTree to Tree (#159)
Avoid stutter.

Fixes #55
2017-05-10 17:53:23 -07:00
Cameron Moore bfe4a7e160 Fix gofmt and golint issues (#90) 2016-08-22 11:20:25 +02:00
Thomas Pelletier de2e921d55 TOML to JSON cli tool (#85)
* Implement tomljson
* Add note about tools in README
2016-08-14 13:50:18 +02:00
Sam Broughton b39f6ef1f9 Add a toml linter (#74)
* Add a toml linter

* Use if/else instead of os.Exit(0)

* Add usage warning about destructive changes
2016-06-06 12:29:13 +02:00
eanderton 1f3d0e03c3 Changes to support #29 - Support multi-line literal strings
* Added error output to test_program.go
* Added multi-line literal string support to lexer
* Added multi-line string supprt to lexer
* Added unit-test for new string support
* Modified test.sh to take an optional parameter to run an individual BurntSushi test suite.
* Fixed formatting
2015-02-26 18:03:30 -05:00
eanderton 7c63fff960 Added Position Support to TomlTree
TomlDocument provides an optional TOML processing path where position
informaiton is stored alongside a TomlTree.
* Added Position struct
* Revised TomlTree to contain position data
* Added tomlValue to bind positions to values
* Revised parser to emit position data
* Revised token to use new Position struct
* Added tests for new functionality
* Bugfixed table array duplicate key handling
* Applied gofmt to all code
2014-08-26 21:00:41 -04:00
eanderton 5dd3b53635 Fixed formatting 2014-07-08 22:02:42 -04:00
eanderton abdecb7be7 Refactored testing approach to use 'vendorized' libraries at test time. 2014-07-08 21:26:30 -04:00