(root: &Path, home: &Path, args: &[&str])
| 20 | const ATOMIC_BIN: &str = env!("CARGO_BIN_EXE_atomic"); |
| 21 | |
| 22 | fn atomic(root: &Path, home: &Path, args: &[&str]) -> Output { |
| 23 | Command::new(ATOMIC_BIN) |
| 24 | .args(args) |
| 25 | .current_dir(root) |
| 26 | .env("HOME", home) |
| 27 | .env("ATOMIC_HOME", home.join(".atomic")) |
| 28 | .env("GIT_CONFIG_NOSYSTEM", "1") |
| 29 | .env("GIT_AUTHOR_NAME", "T") |
| 30 | .env("GIT_AUTHOR_EMAIL", "t@example.com") |
| 31 | .env("GIT_COMMITTER_NAME", "T") |
| 32 | .env("GIT_COMMITTER_EMAIL", "t@example.com") |
| 33 | .output() |
| 34 | .expect("run atomic") |
| 35 | } |
| 36 | |
| 37 | fn atomic_ok(root: &Path, home: &Path, args: &[&str]) -> String { |
| 38 | let output = atomic(root, home, args); |
no test coverage detected