diff --git a/src/main.rs b/src/main.rs index 11282a9..d4782fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,4 +62,12 @@ mod tests { assert!(parse_instruction('F').is_ok()); assert!(parse_instruction('Z').is_err()); } + + #[test] + fn test_open_file() { + assert!(open_file("two_robots.txt").is_ok()); + assert!(open_file("test_unexisting_file.extension").is_err()); + assert!(open_file("no_permission.txt").is_err()); + } + }