MCPcopy Create free account
hub / github.com/dashed/git-chain / run_test_bin

Function run_test_bin

tests/common/mod.rs:216–232  ·  view source on GitHub ↗
(current_dir: P, arguments: I)

Source from the content-addressed store, hash-verified

214}
215
216pub fn run_test_bin<I, T, P: AsRef<Path>>(current_dir: P, arguments: I) -> Output
217where
218 I: IntoIterator<Item = T>,
219 T: AsRef<OsStr>,
220{
221 let mut current_dir_buf: PathBuf = current_dir.as_ref().into();
222 if current_dir_buf.is_relative() {
223 current_dir_buf = current_dir_buf.canonicalize().unwrap();
224 }
225
226 assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME"))
227 .expect("Failed to get git-chain")
228 .current_dir(current_dir_buf)
229 .args(arguments)
230 .output()
231 .expect("Failed to run git-chain")
232}
233
234pub fn run_test_bin_with_env<I, T, E, K, V, P: AsRef<Path>>(
235 current_dir: P,

Calls

no outgoing calls