The two-column lines of `atomic status --git` (dropping Note/heading lines).
(fixture: &Fixture)
| 218 | |
| 219 | /// The two-column lines of `atomic status --git` (dropping Note/heading lines). |
| 220 | fn git_status_rows(fixture: &Fixture) -> Vec<String> { |
| 221 | String::from_utf8_lossy(&fixture.atomic_ok(&["status", "--git"]).stdout) |
| 222 | .lines() |
| 223 | .filter(|line| { |
| 224 | line.len() >= 3 |
| 225 | && line.as_bytes()[2] == b' ' |
| 226 | && matches!( |
| 227 | line.as_bytes()[0], |
| 228 | b' ' | b'M' | b'A' | b'D' | b'T' | b'U' | b'R' | b'C' | b'?' |
| 229 | ) |
| 230 | && matches!( |
| 231 | line.as_bytes()[1], |
| 232 | b' ' | b'M' | b'A' | b'D' | b'T' | b'U' | b'R' | b'C' | b'?' |
| 233 | ) |
| 234 | }) |
| 235 | .map(ToString::to_string) |
| 236 | .collect() |
| 237 | } |
| 238 | |
| 239 | /// The short-format lines of native `atomic status -s`. |
| 240 | fn native_rows(fixture: &Fixture) -> Vec<String> { |