Skip to content

Commit

Permalink
Update toml-test
Browse files Browse the repository at this point in the history
  • Loading branch information
arp242 committed May 23, 2024
1 parent 9a80667 commit f8f7e48
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Hour must be 00-24
d = 1985-06-18 17:04:07+25:00
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Minute must be 00-59; we allow 60 too because some people do write offsets of
# 60 minutes
d = 1985-06-18 17:04:07+12:61
2 changes: 2 additions & 0 deletions internal/toml-test/tests/valid/datetime/datetime.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
space = 1987-07-05 17:45:00Z

# ABNF is case-insensitive, both "Z" and "z" must be supported.
lower = 1987-07-05t17:45:00z
9 changes: 9 additions & 0 deletions internal/toml-test/tests/valid/string/start-mb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"s1": {"type": "string", "value": "§"},
"s2": {"type": "string", "value": "§"},
"s3": {"type": "string", "value": "§"},
"s4": {"type": "string", "value": "§"},
"s5": {"type": "string", "value": "§"},
"s6": {"type": "string", "value": "§"},
"s7": {"type": "string", "value": "§"}
}
13 changes: 13 additions & 0 deletions internal/toml-test/tests/valid/string/start-mb.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Start first line with a multibyte character.
#
# https://github.com/marzer/tomlplusplus/issues/190
s1 = "§"
s2 = '§'
s3 = """\
§"""
s4 = """
§"""
s5 = """§"""
s6 = '''
§'''
s7 = '''§'''
4 changes: 4 additions & 0 deletions toml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ func runTomlTest(t *testing.T, includeNext bool, wantFail ...string) {
Parser: parser{},
RunTests: runTests,
SkipTests: []string{
// Will be fixed in Go 1.23: https://github.com/BurntSushi/toml/issues/407
"invalid/datetime/offset-overflow-hour",
"invalid/datetime/offset-overflow-minute",

// These tests are fine, just doesn't deal well with empty output.
"valid/comment/noeol",
"valid/comment/nonascii",
Expand Down

0 comments on commit f8f7e48

Please sign in to comment.