Format the log graph test (refs #50) e8c8b34d8348
- Author
- Andy McCall @andymccall <[email protected]>
- When
- · 2026-10-01 17:00 UTC
- Signature
- ✔ signed by Andy McCall
- Hash
e8c8b34d8348f3bda78b1d5ef63e8b19d929c6a55e0d0974876e96e928650096- Depends on
- 2bf22305bc48 c6aa5bd9d1c8
- Depended on by
- nothing yet
- In bookmarks
- agents-in-readme bare-hashes carried-not-removed carry-identical doctor-trust identical-sides keyless-tags main merge-remote-bookmark only-help-103 paths-for-resolutions-and-amend push-notes show-stat subrepo-pin-state switch-says
- In tags
- v0.10.0 v0.11.0 v0.2.0 v0.3.0 v0.3.1 v0.4.0 v0.4.1 v0.4.2 v0.4.3 v0.4.4 v0.4.5 v0.4.6 v0.5.0 v0.5.1 v0.6.0 v0.7.0 v0.8.0 v0.9.0
- Edits
- 4 atoms, 0 tree operations, 1 file
Browse the tree at this change
modified tests/cli_json.rs +20 −4
| … | 600 unchanged lines |
||
| 601 | 601 | let home = tmp.path().join("home"); |
|
| 602 | 602 | std::fs::create_dir_all(&home).unwrap(); |
|
| 603 | 603 | let repo = tmp.path().join("r"); |
|
| 604 | - | assert_eq!(oxy(tmp.path(), &home, &["init", repo.to_str().unwrap()]).0, 0); |
|
| 604 | + | assert_eq!( |
|
| 605 | + | oxy(tmp.path(), &home, &["init", repo.to_str().unwrap()]).0, |
|
| 606 | + | 0 |
|
| 607 | + | ); |
|
| 605 | 608 | write(&repo, "a.txt", "a\n"); |
|
| 606 | 609 | write(&repo, "b.txt", "b\n"); |
|
| 607 | 610 | assert_eq!(oxy(&repo, &home, &["commit", "-m", "both files"]).0, 0); |
|
| … | 8 unchanged lines |
||
| 616 | 619 | let lines: Vec<&str> = out.lines().collect(); |
|
| 617 | 620 | // The working copy, then "edit b", "edit a" beside it, then their base. |
|
| 618 | 621 | assert!(lines[0].starts_with('@'), "{out}"); |
|
| 619 | - | assert!(lines.iter().any(|l| l.starts_with("|-'") && l.contains("edit a")), "{out}"); |
|
| 620 | - | assert!(lines.iter().any(|l| l.starts_with("| *") || l.starts_with("| o")), "{out}"); |
|
| 622 | + | assert!( |
|
| 623 | + | lines |
|
| 624 | + | .iter() |
|
| 625 | + | .any(|l| l.starts_with("|-'") && l.contains("edit a")), |
|
| 626 | + | "{out}" |
|
| 627 | + | ); |
|
| 628 | + | assert!( |
|
| 629 | + | lines |
|
| 630 | + | .iter() |
|
| 631 | + | .any(|l| l.starts_with("| *") || l.starts_with("| o")), |
|
| 632 | + | "{out}" |
|
| 633 | + | ); |
|
| 621 | 634 | let base = lines.iter().position(|l| l.contains("both files")).unwrap(); |
|
| 622 | - | assert!(lines[base - 1].contains('#'), "the header line carries the hash: {out}"); |
|
| 635 | + | assert!( |
|
| 636 | + | lines[base - 1].contains('#'), |
|
| 637 | + | "the header line carries the hash: {out}" |
|
| 638 | + | ); |
|
| 623 | 639 | } |