Skip to content

Commit 5c761fe

Browse files
committed
fix tests
1 parent 49ab936 commit 5c761fe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/app/utils.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,18 @@ mod tests {
2525
std::fs::remove_file(file_name).unwrap();
2626
}
2727

28+
#[test]
29+
#[should_panic(expected = "The system cannot find the file specified.")]
30+
#[cfg(target_os = "windows")]
31+
fn test_slurp_file_nonexistent() {
32+
let file_name = "nonexistent.txt";
33+
34+
slurp_file(file_name).unwrap();
35+
}
36+
2837
#[test]
2938
#[should_panic(expected = "No such file or directory")]
39+
#[cfg(not(target_os = "windows"))]
3040
fn test_slurp_file_nonexistent() {
3141
let file_name = "nonexistent.txt";
3242

0 commit comments

Comments
 (0)