feat: add support for toml in addition to json
All checks were successful
/ linting (push) Successful in 3m44s
/ tests (push) Successful in 27s

This commit is contained in:
Bruno Carlin 2024-05-06 11:19:26 +02:00
parent c3d51b1cc2
commit e72c317bbb
Signed by: bcarlin
GPG key ID: 8E254EA0FFEB9B6D
22 changed files with 455 additions and 291 deletions

5
test_data/full.json Normal file
View file

@ -0,0 +1,5 @@
{
"String": "default string",
"Invariant": "should not change",
"Int": 1
}

3
test_data/full.toml Normal file
View file

@ -0,0 +1,3 @@
String = 'default string'
Invariant = 'should not change'
Int = 1

1
test_data/invalid.toml Normal file
View file

@ -0,0 +1 @@
String: not toml

1
test_data/part1.json Normal file
View file

@ -0,0 +1 @@
{"String": "foo"}

1
test_data/part1.toml Normal file
View file

@ -0,0 +1 @@
String = "foo"

1
test_data/part2.json Normal file
View file

@ -0,0 +1 @@
{"Int": 42}

1
test_data/part2.toml Normal file
View file

@ -0,0 +1 @@
Int = 42

1
test_data/same1.json Normal file
View file

@ -0,0 +1 @@
{"String": "foo"}

1
test_data/same1.toml Normal file
View file

@ -0,0 +1 @@
String = "foo"

1
test_data/same2.json Normal file
View file

@ -0,0 +1 @@
{"String": "bar"}

1
test_data/same2.toml Normal file
View file

@ -0,0 +1 @@
String = "bar"

5
test_data/unknown.json Normal file
View file

@ -0,0 +1,5 @@
{
"String": "config string",
"Int": 42,
"Unknown": "foo"
}

3
test_data/unknown.toml Normal file
View file

@ -0,0 +1,3 @@
String = "config string"
Int = 42
Unknown = "foo"

2
test_data/valid.toml Normal file
View file

@ -0,0 +1,2 @@
string = "config string"
int = 42

1
test_data/valid.unknown Normal file
View file

@ -0,0 +1 @@
String: not json