()
| 3 | |
| 4 | #[test] |
| 5 | fn code_example() { |
| 6 | let temp = assert_fs::TempDir::new().unwrap(); |
| 7 | let input_file = temp.child("foo.txt"); |
| 8 | input_file.touch().unwrap(); |
| 9 | |
| 10 | // ... do something with input_file ... |
| 11 | |
| 12 | input_file.assert(""); |
| 13 | temp.child("bar.txt").assert(predicate::path::missing()); |
| 14 | |
| 15 | temp.close().unwrap(); |
| 16 | } |
| 17 | |
| 18 | #[test] |
| 19 | #[should_panic = "Unexpected file"] |