diff --git a/Cargo.lock b/Cargo.lock index 857459e5..07d8f9a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -913,9 +913,9 @@ dependencies = [ [[package]] name = "toml-test-data" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0082ae0d631f97530e98829c4101ae3ce3f1821a88f0a04be4fc3eaca5e7ed2d" +checksum = "b6d7b3654ed31d96108843e2cc72cba3a3a04a86a3b8bacf64a7fbf95dcd9dfc" dependencies = [ "include_dir", ] diff --git a/crates/toml/Cargo.toml b/crates/toml/Cargo.toml index d9d9f9fb..7086f5f6 100644 --- a/crates/toml/Cargo.toml +++ b/crates/toml/Cargo.toml @@ -50,7 +50,7 @@ serde_spanned = { version = "0.6.4", path = "../serde_spanned", features = ["ser serde = { version = "1.0.160", features = ["derive"] } serde_json = "1.0.96" toml-test-harness = "0.4.8" -toml-test-data = "1.4.0" +toml-test-data = "1.5.0" snapbox = "0.4.11" [[test]] diff --git a/crates/toml_edit/Cargo.toml b/crates/toml_edit/Cargo.toml index 5025856f..738736cd 100644 --- a/crates/toml_edit/Cargo.toml +++ b/crates/toml_edit/Cargo.toml @@ -50,7 +50,7 @@ serde_spanned = { version = "0.6.4", path = "../serde_spanned", features = ["ser [dev-dependencies] serde_json = "1.0.96" toml-test-harness = "0.4.8" -toml-test-data = "1.4.0" +toml-test-data = "1.5.0" libtest-mimic = "0.6.0" snapbox = { version = "0.4.11", features = ["harness"] } diff --git a/crates/toml_edit/tests/fixtures/invalid/float/exp-point-3.stderr b/crates/toml_edit/tests/fixtures/invalid/float/exp-point-3.stderr new file mode 100644 index 00000000..873791ca --- /dev/null +++ b/crates/toml_edit/tests/fixtures/invalid/float/exp-point-3.stderr @@ -0,0 +1,6 @@ +TOML parse error at line 1, column 17 + | +1 | exp-point-3 = 3.e+20 + | ^ +invalid floating-point number +expected digit diff --git a/crates/toml_edit/tests/fixtures/invalid/float/exp-trailing-us-1.stderr b/crates/toml_edit/tests/fixtures/invalid/float/exp-trailing-us-1.stderr new file mode 100644 index 00000000..254bdf20 --- /dev/null +++ b/crates/toml_edit/tests/fixtures/invalid/float/exp-trailing-us-1.stderr @@ -0,0 +1,6 @@ +TOML parse error at line 1, column 23 + | +1 | exp-trailing-us-1 = 1_e2 + | ^ +invalid integer +expected digit diff --git a/crates/toml_edit/tests/fixtures/invalid/float/exp-trailing-us-2.stderr b/crates/toml_edit/tests/fixtures/invalid/float/exp-trailing-us-2.stderr new file mode 100644 index 00000000..b2986ad6 --- /dev/null +++ b/crates/toml_edit/tests/fixtures/invalid/float/exp-trailing-us-2.stderr @@ -0,0 +1,6 @@ +TOML parse error at line 1, column 25 + | +1 | exp-trailing-us-2 = 1.2_e2 + | ^ +invalid floating-point number +expected digit, digit diff --git a/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-1.stderr b/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-1.stderr new file mode 100644 index 00000000..c58dd3c3 --- /dev/null +++ b/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-1.stderr @@ -0,0 +1,5 @@ +TOML parse error at line 2, column 1 + | +2 | name = "Pradyun" + | ^ +duplicate key `name` in document root diff --git a/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-2.stderr b/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-2.stderr new file mode 100644 index 00000000..74149f85 --- /dev/null +++ b/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-2.stderr @@ -0,0 +1,5 @@ +TOML parse error at line 2, column 1 + | +2 | dupe = true + | ^ +duplicate key `dupe` in document root diff --git a/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-3.stderr b/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-3.stderr new file mode 100644 index 00000000..94a019fd --- /dev/null +++ b/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-3.stderr @@ -0,0 +1,5 @@ +TOML parse error at line 2, column 1 + | +2 | "spelling" = "favourite" + | ^ +duplicate key `spelling` in document root diff --git a/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-4.stderr b/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-4.stderr new file mode 100644 index 00000000..2bd02ab1 --- /dev/null +++ b/crates/toml_edit/tests/fixtures/invalid/key/duplicate-keys-4.stderr @@ -0,0 +1,5 @@ +TOML parse error at line 2, column 1 + | +2 | 'spelling' = "favourite" + | ^ +duplicate key `spelling` in document root