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.
2 parents 424b261 + c80cf41 commit 2250059Copy full SHA for 2250059
tests/file_json.rs
@@ -81,3 +81,24 @@ fn test_error_parse() {
81
)
82
);
83
}
84
+
85
+#[test]
86
+fn test_json_vec() {
87
+ let c = Config::default()
88
+ .merge(File::from_str(
89
+ r#"
90
+ {
91
+ "WASTE": ["example_dir1", "example_dir2"]
92
+ }
93
+ "#,
94
+ FileFormat::Json,
95
+ ))
96
+ .unwrap()
97
+ .clone();
98
99
+ let v = c.get_array("WASTE").unwrap();
100
+ let mut vi = v.into_iter();
101
+ assert_eq!(vi.next().unwrap().into_str().unwrap(), "example_dir1");
102
+ assert_eq!(vi.next().unwrap().into_str().unwrap(), "example_dir2");
103
+ assert!(vi.next().is_none());
104
+}
0 commit comments