MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / run

Function run

atomic-cli/tests/it/view_confirmation_integration_test.rs:9–23  ·  view source on GitHub ↗
(root: &std::path::Path, args: &[&str], succeeds: bool)

Source from the content-addressed store, hash-verified

7use atomic_repository::{RecordOptions, Repository};
8
9fn run(root: &std::path::Path, args: &[&str], succeeds: bool) -> String {
10 let output = Command::new(env!("CARGO_BIN_EXE_atomic"))
11 .args(args)
12 .current_dir(root)
13 .stdin(Stdio::null())
14 .output()
15 .unwrap();
16 let text = format!(
17 "{}{}",
18 String::from_utf8_lossy(&output.stdout),
19 String::from_utf8_lossy(&output.stderr),
20 );
21 assert_eq!(output.status.success(), succeeds, "{args:?}: {text}");
22 text
23}
24
25#[test]
26fn split_and_orphaning_delete_require_explicit_confirmation_without_a_terminal() {

Calls 2

unwrapMethod · 0.45
outputMethod · 0.45

Tested by

no test coverage detected