implement game configuration file
this integrates https://github.com/cktan/tomlc99 into the repo as a dependency
This commit is contained in:
3
third-party/tomlc99/test1/.gitignore
vendored
Normal file
3
third-party/tomlc99/test1/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/goworkspace
|
||||
/toml-test
|
||||
/toml-test-decoder
|
22
third-party/tomlc99/test1/README.md
vendored
Normal file
22
third-party/tomlc99/test1/README.md
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
How to run the tests
|
||||
===
|
||||
|
||||
```
|
||||
% bash build.sh
|
||||
% bash run.sh
|
||||
Test: array-mixed-types-arrays-and-ints (invalid)
|
||||
|
||||
Expected an error, but no error was reported.
|
||||
-------------------------------------------------------------------------------
|
||||
Test: array-mixed-types-ints-and-floats (invalid)
|
||||
|
||||
Expected an error, but no error was reported.
|
||||
-------------------------------------------------------------------------------
|
||||
Test: array-mixed-types-strings-and-ints (invalid)
|
||||
|
||||
Expected an error, but no error was reported.
|
||||
|
||||
129 passed, 3 failed
|
||||
```
|
||||
|
||||
Note: toml version 1.0 allows mixed types in arrays.
|
6
third-party/tomlc99/test1/build.sh
vendored
Normal file
6
third-party/tomlc99/test1/build.sh
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
export GOBIN=$DIR
|
||||
go install github.com/toml-lang/toml-test/cmd/toml-test@latest # install test suite
|
1
third-party/tomlc99/test1/extra/array_of_tables.toml
vendored
Normal file
1
third-party/tomlc99/test1/extra/array_of_tables.toml
vendored
Normal file
@ -0,0 +1 @@
|
||||
x = [ {'a'= 1}, {'a'= 2} ]
|
1
third-party/tomlc99/test1/extra/inline_array.toml
vendored
Normal file
1
third-party/tomlc99/test1/extra/inline_array.toml
vendored
Normal file
@ -0,0 +1 @@
|
||||
x = [1,2,3]
|
1
third-party/tomlc99/test1/extra/inline_table.toml
vendored
Normal file
1
third-party/tomlc99/test1/extra/inline_table.toml
vendored
Normal file
@ -0,0 +1 @@
|
||||
x = {'a'= 1, 'b'= 2 }
|
5
third-party/tomlc99/test1/run.sh
vendored
Normal file
5
third-party/tomlc99/test1/run.sh
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
$DIR/toml-test $DIR/../toml_json
|
Reference in New Issue
Block a user