Skip to content

Commit

Permalink
Merge pull request #7882 from ben-albrecht/Split-toml-test-suite
Browse files Browse the repository at this point in the history
Split up TOML tests based on pass/fail

Added a `Passing.chpl` test for the passing tests of the BurntSushi suite. (#7104)
This will remove any passing futures from testing.

As tests pass, they should be migrated over to `Passing.execopts`

Also removed a unintended copy of the future (`TestToml.future`)


**Testing**
- [x] `start_test test/library/packages/TOML/BurntSushi`

[eagerly reviewed by @lydia-duncan]
  • Loading branch information
ben-albrecht committed Nov 28, 2017
2 parents ec3359c + 396848c commit efed946
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 14 deletions.
23 changes: 23 additions & 0 deletions test/library/packages/TOML/BurntSushi/Passing.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use TOML;

/*
Tests from BurntSushi/toml-test 'valid' suite:
https://github.com/BurntSushi/toml-test
*/

config const f = 'bool.toml';

proc main() {
var tomlChannel = openreader(f);
var tomlData = parseToml(tomlChannel);

const j = f.replace('.toml', '.json.out');
var jsonChannel = openwriter(j);

tomlData.writeJSON(jsonChannel);

jsonChannel.close();
delete tomlData;
tomlChannel.close();
}
7 changes: 7 additions & 0 deletions test/library/packages/TOML/BurntSushi/Passing.execopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--f=bool.toml # bool.good
--f=empty.toml # empty.good
--f=float.toml # float.good
--f=integer.toml # integer.good
--f=key-equals-nospace.toml # key-equals-nospace.good
--f=long-integer.toml # long-integer.good
--f=table-empty.toml # table-empty.good
6 changes: 0 additions & 6 deletions test/library/packages/TOML/BurntSushi/TestToml.future

This file was deleted.

7 changes: 0 additions & 7 deletions test/library/packages/TOML/BurntSushi/TomlTest.execopts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,15 @@
--f=arrays-hetergeneous.toml # arrays-hetergeneous.good
--f=arrays-nested.toml # arrays-nested.good
--f=arrays.toml # arrays.good
--f=bool.toml # bool.good
--f=comments-everywhere.toml # comments-everywhere.good
--f=datetime.toml # datetime.good
--f=empty.toml # empty.good
--f=example.toml # example.good
--f=float.toml # float.good
--f=implicit-and-explicit-after.toml # implicit-and-explicit-after.good
--f=implicit-and-explicit-before.toml # implicit-and-explicit-before.good
--f=implicit-groups.toml # implicit-groups.good
--f=integer.toml # integer.good
--f=key-equals-nospace.toml # key-equals-nospace.good
--f=key-space.toml # key-space.good
--f=key-special-chars.toml # key-special-chars.good
--f=long-float.toml # long-float.good
--f=long-integer.toml # long-integer.good
--f=multiline-string.toml # multiline-string.good
--f=raw-multiline-string.toml # raw-multiline-string.good
--f=raw-string.toml # raw-string.good
Expand All @@ -29,7 +23,6 @@
--f=table-array-many.toml # table-array-many.good
--f=table-array-nest.toml # table-array-nest.good
--f=table-array-one.toml # table-array-one.good
--f=table-empty.toml # table-empty.good
--f=table-sub-empty.toml # table-sub-empty.good
--f=table-whitespace.toml # table-whitespace.good
--f=table-with-pound.toml # table-with-pound.good
Expand Down
7 changes: 6 additions & 1 deletion test/library/packages/TOML/BurntSushi/TomlTest.future
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
feature request: Improve TOML library
Issue #7104

Test taken from BurntSushi/toml-test
Test taken from BurntSushi test suite:

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

Passing tests are listed in Passing.execopts. It is desired to eventually
move all execopts over to Passing.execopts and retire (remove) TestToml.chpl

0 comments on commit efed946

Please sign in to comment.