diff options
Diffstat (limited to 'test-suite')
-rw-r--r-- | test-suite/tests/datetime.rs | 6 | ||||
-rw-r--r-- | test-suite/tests/invalid.rs | 4 | ||||
-rw-r--r-- | test-suite/tests/parser.rs | 19 |
3 files changed, 19 insertions, 10 deletions
diff --git a/test-suite/tests/datetime.rs b/test-suite/tests/datetime.rs index 74b5939..6c08748 100644 --- a/test-suite/tests/datetime.rs +++ b/test-suite/tests/datetime.rs @@ -68,15 +68,15 @@ fn bad_times() { ); bad!( "foo = T", - "failed to parse datetime for key `foo` at line 1 column 7" + "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" ); bad!( "foo = T.", - "expected newline, found a period at line 1 column 8" + "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" ); bad!( "foo = TZ", - "failed to parse datetime for key `foo` at line 1 column 7" + "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" ); bad!( "foo = 1997-09-09T09:09:09.09+", diff --git a/test-suite/tests/invalid.rs b/test-suite/tests/invalid.rs index ccc9338..f04d860 100644 --- a/test-suite/tests/invalid.rs +++ b/test-suite/tests/invalid.rs @@ -197,7 +197,7 @@ test!( test!( text_after_array_entries, include_str!("invalid/text-after-array-entries.toml"), - "invalid number at line 2 column 46" + "invalid TOML value, did you mean to use a quoted string? at line 2 column 46" ); test!( text_after_integer, @@ -222,5 +222,5 @@ test!( test!( text_in_array, include_str!("invalid/text-in-array.toml"), - "invalid number at line 3 column 3" + "invalid TOML value, did you mean to use a quoted string? at line 3 column 3" ); diff --git a/test-suite/tests/parser.rs b/test-suite/tests/parser.rs index eab9f5a..169df79 100644 --- a/test-suite/tests/parser.rs +++ b/test-suite/tests/parser.rs @@ -491,7 +491,10 @@ fn number_underscores() { fn bad_underscores() { bad!("foo = 0_", "invalid number at line 1 column 7"); bad!("foo = 0__0", "invalid number at line 1 column 7"); - bad!("foo = __0", "invalid number at line 1 column 7"); + bad!( + "foo = __0", + "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" + ); bad!("foo = 1_0_", "invalid number at line 1 column 7"); } @@ -537,14 +540,20 @@ fn booleans() { bad!( "foo = true2", - "failed to parse datetime for key `foo` at line 1 column 7" + "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" + ); + bad!( + "foo = false2", + "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" ); - bad!("foo = false2", "invalid number at line 1 column 7"); bad!( "foo = t1", - "failed to parse datetime for key `foo` at line 1 column 7" + "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" + ); + bad!( + "foo = f2", + "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" ); - bad!("foo = f2", "invalid number at line 1 column 7"); } #[test] |