Added test_open_file()
				
					
				
			This commit is contained in:
		
							parent
							
								
									1ee584801a
								
							
						
					
					
						commit
						8c04fe7b9d
					
				@ -62,4 +62,12 @@ mod tests {
 | 
				
			|||||||
        assert!(parse_instruction('F').is_ok());
 | 
					        assert!(parse_instruction('F').is_ok());
 | 
				
			||||||
        assert!(parse_instruction('Z').is_err());
 | 
					        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());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user