implement game configuration file
this integrates https://github.com/cktan/tomlc99 into the repo as a dependency
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
/goworkspace
|
||||
/toml-test
|
||||
/toml-test-decoder
|
||||
Vendored
+22
@@ -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.
|
||||
Vendored
+6
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
x = [ {'a'= 1}, {'a'= 2} ]
|
||||
@@ -0,0 +1 @@
|
||||
x = [1,2,3]
|
||||
@@ -0,0 +1 @@
|
||||
x = {'a'= 1, 'b'= 2 }
|
||||
Vendored
+5
@@ -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