MCPcopy Create free account
hub / github.com/davidhfrankelcodes/rwatch / test_diff_permanent_basic

Function test_diff_permanent_basic

tests/integration_tests.rs:152–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150
151#[test]
152fn test_diff_permanent_basic() {
153 let mut args: Vec<String> = vec!["-d=permanent".into(), "--chgexit".into(), "--".into()];
154 args.extend(echo_cmd("bar"));
155 let args_ref: Vec<&str> = args.iter().map(|s| s.as_str()).collect();
156 let (ok, out, _) = run_rwatch(&args_ref);
157 assert!(ok);
158 assert!(has_diff_line(&out, ' ', "bar") || has_diff_line(&out, '+', "bar"),
159 "diff output should contain bar; lines: {:?}", out.lines().collect::<Vec<_>>());
160}
161
162/// Bug fix verification: permanent diff must compare against the FIRST run's output,
163/// not against the empty string that was erroneously used before the fix.

Callers

nothing calls this directly

Calls 2

echo_cmdFunction · 0.85
run_rwatchFunction · 0.85

Tested by

no test coverage detected