implement game configuration file

this integrates https://github.com/cktan/tomlc99 into the repo as a dependency
This commit is contained in:
2024-09-30 21:13:58 -03:00
committed by veclavtalica
parent ec15d8ec4b
commit 57fe5e8946
165 changed files with 4797 additions and 92 deletions

3
third-party/tomlc99/test1/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/goworkspace
/toml-test
/toml-test-decoder

22
third-party/tomlc99/test1/README.md vendored Normal file
View 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
View 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

View File

@ -0,0 +1 @@
x = [ {'a'= 1}, {'a'= 2} ]

View File

@ -0,0 +1 @@
x = [1,2,3]

View File

@ -0,0 +1 @@
x = {'a'= 1, 'b'= 2 }

5
third-party/tomlc99/test1/run.sh vendored Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
$DIR/toml-test $DIR/../toml_json