We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8abb8c9 commit 8398f9aCopy full SHA for 8398f9a
src/config.rs
@@ -84,6 +84,17 @@ mod tests {
84
})
85
}
86
87
+ #[test]
88
+ fn test_read_config_from_invalid_file() {
89
+ let file = assert_fs::NamedTempFile::new("envfetch.toml").unwrap();
90
+ // Just print anything wrong to file
91
+ file.write_str("aegkbiv wlecn k").unwrap();
92
+ match read_config_from_file(file.path().to_path_buf()) {
93
+ Err(ConfigParsingError::ParsingError(_)) => (),
94
+ _ => panic!("Should crash with ParsingError")
95
+ }
96
97
+
98
#[test]
99
fn test_read_config_from_unexistent_file() {
100
let file = assert_fs::NamedTempFile::new("envfetch.toml").unwrap();
0 commit comments