()
| 270 | } |
| 271 | |
| 272 | fn main() { |
| 273 | let mut args = env::args(); |
| 274 | let prog = args.next().unwrap(); |
| 275 | let arg = if let Some(arg) = args.next() { |
| 276 | arg |
| 277 | } else { |
| 278 | eprintln!("usage: {prog} <scratch directory>"); |
| 279 | process::exit(1); |
| 280 | }; |
| 281 | |
| 282 | // Open scratch directory |
| 283 | let dir_fd = match open_scratch_directory(&arg) { |
| 284 | Ok(dir_fd) => dir_fd, |
| 285 | Err(err) => { |
| 286 | eprintln!("{err}"); |
| 287 | process::exit(1) |
| 288 | } |
| 289 | }; |
| 290 | |
| 291 | // Run the tests. |
| 292 | unsafe { test_fd_readdir(dir_fd) } |
| 293 | unsafe { test_fd_readdir_lots(dir_fd) } |
| 294 | unsafe { test_fd_readdir_unicode_boundary(dir_fd) } |
| 295 | unsafe { test_fd_readdir_past_end(dir_fd) } |
| 296 | } |
nothing calls this directly
no test coverage detected