Skip to content

Commit

Permalink
test: Verify with latest data
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 2, 2023
1 parent 2f9253c commit e1f2037
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/toml/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ serde_spanned = { version = "0.6.3", path = "../serde_spanned", features = ["ser
[dev-dependencies]
serde = { version = "1.0.160", features = ["derive"] }
serde_json = "1.0.96"
toml-test-harness = "0.4.4"
toml-test-harness = "0.4.5"
toml-test-data = "1.3.1"
snapbox = "0.4.11"

Expand Down
7 changes: 2 additions & 5 deletions crates/toml/tests/decoder_compliance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ fn main() {
harness
.ignore([
"valid/spec/float-0.toml",
// Unreleased
"valid/string/escape-esc.toml",
"valid/string/hex-escape.toml",
"valid/datetime/no-seconds.toml",
"valid/inline-table/newline.toml",
"invalid/inline-table/nested_key_conflict.toml",
])
.unwrap();
harness.version("1.0.0");
harness.test();
}

Expand Down
1 change: 1 addition & 0 deletions crates/toml/tests/encoder_compliance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ fn main() {
let decoder = decoder::Decoder;
let mut harness = toml_test_harness::EncoderHarness::new(encoder, decoder);
harness.ignore(["valid/spec/float-0.toml"]).unwrap();
harness.version("1.0.0");
harness.test();
}

Expand Down
2 changes: 1 addition & 1 deletion crates/toml_edit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ serde_spanned = { version = "0.6.3", path = "../serde_spanned", features = ["ser

[dev-dependencies]
serde_json = "1.0.96"
toml-test-harness = "0.4.4"
toml-test-harness = "0.4.5"
toml-test-data = "1.3.1"
libtest-mimic = "0.6.0"
snapbox = { version = "0.4.11", features = ["harness"] }
Expand Down
9 changes: 3 additions & 6 deletions crates/toml_edit/tests/decoder_compliance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ fn main() {
let mut harness = toml_test_harness::DecoderHarness::new(decoder);
harness
.ignore([
"valid/spec/float-0.toml", // Test issue; `Decoder` turns `6.626e-34` into `0.0`
// Unreleased
"valid/string/escape-esc.toml",
"valid/string/hex-escape.toml",
"valid/datetime/no-seconds.toml",
"valid/inline-table/newline.toml",
"valid/spec/float-0.toml",
"invalid/inline-table/nested_key_conflict.toml",
])
.unwrap();
harness.version("1.0.0");
harness.test();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
invalid utf-8 sequence of 1 bytes from index 29
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
TOML parse error at line 1, column 21
TOML parse error at line 1, column 24
|
1 | exp-trailing-us = 1e_23_
| ^
1 | exp-trailing-us = 1e23_
| ^
invalid floating-point number
expected digit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TOML parse error at line 1, column 5
|
1 | v = Inf
| ^
invalid string
expected `"`, `'`
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TOML parse error at line 1, column 5
|
1 | v = NaN
| ^
invalid string
expected `"`, `'`
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TOML parse error at line 1, column 23
|
1 | trailing-us-exp-1 = 1_e2
| ^
invalid integer
expected digit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TOML parse error at line 1, column 25
|
1 | trailing-us-exp-2 = 1.2_e2
| ^
invalid floating-point number
expected digit, digit

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TOML parse error at line 1, column 14
|
1 | tbl = { a = 1, [b] }
| ^
invalid inline table
expected `}`
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TOML parse error at line 1, column 8
|
1 | tbl = { a.b = "a_b", a.b.c = "a_b_c" }
| ^
dotted key `a.b` attempted to extend non-table type (string)
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TOML parse error at line 4, column 1
|
4 | b.y = 2
| ^
duplicate key `y`
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TOML parse error at line 4, column 1
|
4 | [[fruit.apple]]
| ^
invalid table header
duplicate key `apple` in table `fruit`

0 comments on commit e1f2037

Please sign in to comment.