()
| 111 | |
| 112 | #[test] |
| 113 | fn git_program_is_stable_and_resolves() { |
| 114 | // Cached: two calls return the identical pointer/value. |
| 115 | let first = git_program(); |
| 116 | let second = git_program(); |
| 117 | assert_eq!(first, second); |
| 118 | |
| 119 | // Either an existing absolute path was found, or we fell back to the |
| 120 | // literal "git" — never worse than a bare Command::new("git"). |
| 121 | let resolved = Path::new(first); |
| 122 | assert!( |
| 123 | resolved == Path::new(GIT_LITERAL) || resolved.is_file(), |
| 124 | "git_program() should be the \"git\" fallback or an existing file, got {}", |
| 125 | resolved.display() |
| 126 | ); |
| 127 | } |
| 128 | |
| 129 | #[test] |
| 130 | fn git_env_override_is_honored() { |
nothing calls this directly
no test coverage detected