()
| 150 | |
| 151 | #[test] |
| 152 | fn 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. |
nothing calls this directly
no test coverage detected