(dir: &Path, args: &[&str])
| 91 | } |
| 92 | |
| 93 | fn git(dir: &Path, args: &[&str]) { |
| 94 | let output = Command::new(crate::git::git_program()) |
| 95 | .args(["-c", "user.name=t", "-c", "user.email=t@t"]) |
| 96 | .args(args) |
| 97 | .current_dir(dir) |
| 98 | .output() |
| 99 | .expect("git should run"); |
| 100 | assert!( |
| 101 | output.status.success(), |
| 102 | "git {args:?} failed in {}\nstdout:\n{}\nstderr:\n{}", |
| 103 | dir.display(), |
| 104 | String::from_utf8_lossy(&output.stdout), |
| 105 | String::from_utf8_lossy(&output.stderr) |
| 106 | ); |
| 107 | } |
| 108 | |
| 109 | /// A bare temp git repo with one commit. Not indexed by tracedecay — these |
| 110 | /// tests exercise the watcher's registration/debounce plumbing, which runs |
no test coverage detected