diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-10-02 19:46:59 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-10-02 20:40:17 +0200 |
commit | 1c3e1880c0a6e5a30bdff9a7325bbd4964f9ae68 (patch) | |
tree | acc4d41620ef551dc3cd41915125cca3515bcd6c | |
parent | bbbabf7f4d17e0b018f9f3b14741e6eb3c1ff16c (diff) |
Move test that requires "json5" feature to json5 testsfeature-gates-tests
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | tests/errors.rs | 16 | ||||
-rw-r--r-- | tests/file_json5.rs | 17 |
2 files changed, 17 insertions, 16 deletions
diff --git a/tests/errors.rs b/tests/errors.rs index 856da4f..7075dad 100644 --- a/tests/errors.rs +++ b/tests/errors.rs @@ -134,19 +134,3 @@ fn error_with_path() { } } -#[test] -fn test_error_root_not_table() { - match Config::builder() - .add_source(File::from_str(r#"false"#, FileFormat::Json5)) - .build() - { - Ok(_) => panic!("Should not merge if root is not a table"), - Err(e) => match e { - ConfigError::FileParse { cause, .. } => assert_eq!( - "invalid type: boolean `false`, expected a map", - format!("{}", cause) - ), - _ => panic!("Wrong error: {:?}", e), - }, - } -} diff --git a/tests/file_json5.rs b/tests/file_json5.rs index a768bba..4af3556 100644 --- a/tests/file_json5.rs +++ b/tests/file_json5.rs @@ -94,3 +94,20 @@ fn test_error_parse() { ) ); } + +#[test] +fn test_error_root_not_table() { + match Config::builder() + .add_source(File::from_str(r#"false"#, FileFormat::Json5)) + .build() + { + Ok(_) => panic!("Should not merge if root is not a table"), + Err(e) => match e { + ConfigError::FileParse { cause, .. } => assert_eq!( + "invalid type: boolean `false`, expected a map", + format!("{}", cause) + ), + _ => panic!("Wrong error: {:?}", e), + }, + } +} |