We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf3c014 commit 4c11e78Copy full SHA for 4c11e78
tests/testsuite/file_yaml.rs
@@ -358,3 +358,22 @@ inner_vec:
358
str!["Cannot parse Array([Integer(1), Integer(2)]) because it is an unsupported hash key type"]
359
);
360
}
361
+
362
+#[test]
363
+fn test_yaml_parsing_bool_hash_fails() {
364
+ let result = Config::builder()
365
+ .add_source(File::from_str(
366
+ r#"
367
+inner_bool:
368
+ true: "bool true"
369
+ false: "bool false"
370
+"#,
371
+ FileFormat::Yaml,
372
+ ))
373
+ .build();
374
+ assert!(result.is_err());
375
+ assert_data_eq!(
376
+ result.unwrap_err().to_string(),
377
+ str!["Cannot parse Boolean(true) because it is an unsupported hash key type"]
378
+ );
379
+}
0 commit comments