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

Function atomic_stdout

atomic-cli/tests/it/git_import_cb9c_test.rs:103–111  ·  view source on GitHub ↗

Stdout only: the comparable command output. The command must SUCCEED (review CB-9C R6): a failed child's empty stdout must never enter an exact comparison as a "clean" oracle — an exit-status-discardig helper accepted `status -s` failing with a database lock as an empty stdout. Timing/provenance warnings on stderr vary between runs and never enter the exact comparison.

(root: &Path, home: &Path, args: &[&str])

Source from the content-addressed store, hash-verified

101/// Timing/provenance warnings on stderr vary between runs and never enter
102/// the exact comparison.
103fn atomic_stdout(root: &Path, home: &Path, args: &[&str]) -> String {
104 let output = atomic(root, home, args);
105 assert!(
106 output.status.success(),
107 "atomic {args:?} must succeed (empty stdout is not an oracle):\n{}",
108 atomic_text(&output)
109 );
110 String::from_utf8_lossy(&output.stdout).to_string()
111}
112
113fn atomic_ok(root: &Path, home: &Path, args: &[&str]) -> String {
114 let output = atomic(root, home, args);

Calls 1

atomicFunction · 0.70

Tested by

no test coverage detected