Skip to content

Commit c299e75

Browse files
committed
Update toml-test
This adds a failing test case for #403.
1 parent 4223137 commit c299e75

12 files changed

+12
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Set implicit "b", overwrite "b" (illegal!) and then set another implicit.
2+
#
3+
# Caused panic: https://github.com/BurntSushi/toml/issues/403
4+
a = {b.a = 1, b = 2, b.c = 3}

internal/toml-test/tests/valid/spec/float-2.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"sf1": {
33
"type": "float",
4-
"value": "+inf"
4+
"value": "inf"
55
},
66
"sf2": {
77
"type": "float",
8-
"value": "+inf"
8+
"value": "inf"
99
},
1010
"sf3": {
1111
"type": "float",

toml_test.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -313,16 +313,19 @@ func runTomlTest(t *testing.T, includeNext bool, wantFail ...string) {
313313
Parser: parser{},
314314
RunTests: runTests,
315315
SkipTests: []string{
316+
// TODO: https://github.com/BurntSushi/toml/issues/403
317+
"invalid/inline-table/overwrite-10",
318+
316319
// These tests are fine, just doesn't deal well with empty output.
317320
"valid/comment/noeol",
318321
"valid/comment/nonascii",
319322

320323
// TODO: fix this; we allow appending to tables, but shouldn't.
321324
"invalid/array/extend-defined-aot",
322325
"invalid/inline-table/duplicate-key-3",
323-
"invalid/inline-table/overwrite-2",
324-
"invalid/inline-table/overwrite-7",
325-
"invalid/inline-table/overwrite-8",
326+
"invalid/inline-table/overwrite-02",
327+
"invalid/inline-table/overwrite-07",
328+
"invalid/inline-table/overwrite-08",
326329
"invalid/spec/inline-table-2-0",
327330
"invalid/spec/table-9-1",
328331
"invalid/table/append-to-array-with-dotted-keys",

0 commit comments

Comments
 (0)