diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-20 16:22:10 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-20 16:48:48 +0000 |
| commit | 141ebf0cc0c6cfea640debc9b9073303509a8bc7 (patch) | |
| tree | 579ef546ea83b13a56066e44c43318ad9ed4f3d0 /tests/list.rs | |
| parent | c2817d081700d1fe14d92c51c4e89551182e7fb6 (diff) | |
feat(list): set checkout branch as default choice
instead of no default. note: I spent hours trying to get
CliTester to support default choices and gave up.
I have a stashed the attempt and am moving on...
Diffstat (limited to 'tests/list.rs')
| -rw-r--r-- | tests/list.rs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/list.rs b/tests/list.rs index 0c138d5..7762b1c 100644 --- a/tests/list.rs +++ b/tests/list.rs | |||
| @@ -266,7 +266,7 @@ mod when_main_branch_is_uptodate { | |||
| 266 | format!("\"{PROPOSAL_TITLE_3}\""), | 266 | format!("\"{PROPOSAL_TITLE_3}\""), |
| 267 | ], | 267 | ], |
| 268 | )?; | 268 | )?; |
| 269 | c.succeeds_with(0, true)?; | 269 | c.succeeds_with(0, true, None)?; |
| 270 | 270 | ||
| 271 | p.expect("finding commits...\r\n")?; | 271 | p.expect("finding commits...\r\n")?; |
| 272 | let mut c = p.expect_choice( | 272 | let mut c = p.expect_choice( |
| @@ -279,7 +279,7 @@ mod when_main_branch_is_uptodate { | |||
| 279 | format!("back"), | 279 | format!("back"), |
| 280 | ], | 280 | ], |
| 281 | )?; | 281 | )?; |
| 282 | c.succeeds_with(0, false)?; | 282 | c.succeeds_with(0, false, Some(0))?; |
| 283 | p.expect(format!( | 283 | p.expect(format!( |
| 284 | "checked out proposal as '{FEATURE_BRANCH_NAME_1}' branch\r\n" | 284 | "checked out proposal as '{FEATURE_BRANCH_NAME_1}' branch\r\n" |
| 285 | ))?; | 285 | ))?; |
| @@ -339,7 +339,7 @@ mod when_main_branch_is_uptodate { | |||
| 339 | format!("\"{PROPOSAL_TITLE_3}\""), | 339 | format!("\"{PROPOSAL_TITLE_3}\""), |
| 340 | ], | 340 | ], |
| 341 | )?; | 341 | )?; |
| 342 | c.succeeds_with(0, true)?; | 342 | c.succeeds_with(0, true, None)?; |
| 343 | p.expect("finding commits...\r\n")?; | 343 | p.expect("finding commits...\r\n")?; |
| 344 | let mut c = p.expect_choice( | 344 | let mut c = p.expect_choice( |
| 345 | "", | 345 | "", |
| @@ -351,7 +351,7 @@ mod when_main_branch_is_uptodate { | |||
| 351 | format!("back"), | 351 | format!("back"), |
| 352 | ], | 352 | ], |
| 353 | )?; | 353 | )?; |
| 354 | c.succeeds_with(0, false)?; | 354 | c.succeeds_with(0, false, None)?; |
| 355 | p.expect(format!( | 355 | p.expect(format!( |
| 356 | "checked out proposal as '{FEATURE_BRANCH_NAME_1}' branch\r\n" | 356 | "checked out proposal as '{FEATURE_BRANCH_NAME_1}' branch\r\n" |
| 357 | ))?; | 357 | ))?; |
| @@ -455,7 +455,7 @@ mod when_main_branch_is_uptodate { | |||
| 455 | format!("\"{PROPOSAL_TITLE_3}\""), | 455 | format!("\"{PROPOSAL_TITLE_3}\""), |
| 456 | ], | 456 | ], |
| 457 | )?; | 457 | )?; |
| 458 | c.succeeds_with(2, true)?; | 458 | c.succeeds_with(2, true, None)?; |
| 459 | 459 | ||
| 460 | p.expect("finding commits...\r\n")?; | 460 | p.expect("finding commits...\r\n")?; |
| 461 | let mut c = p.expect_choice( | 461 | let mut c = p.expect_choice( |
| @@ -468,7 +468,7 @@ mod when_main_branch_is_uptodate { | |||
| 468 | format!("back"), | 468 | format!("back"), |
| 469 | ], | 469 | ], |
| 470 | )?; | 470 | )?; |
| 471 | c.succeeds_with(0, false)?; | 471 | c.succeeds_with(0, false, Some(0))?; |
| 472 | p.expect(format!( | 472 | p.expect(format!( |
| 473 | "checked out proposal as '{FEATURE_BRANCH_NAME_3}' branch\r\n" | 473 | "checked out proposal as '{FEATURE_BRANCH_NAME_3}' branch\r\n" |
| 474 | ))?; | 474 | ))?; |
| @@ -529,7 +529,7 @@ mod when_main_branch_is_uptodate { | |||
| 529 | format!("\"{PROPOSAL_TITLE_3}\""), | 529 | format!("\"{PROPOSAL_TITLE_3}\""), |
| 530 | ], | 530 | ], |
| 531 | )?; | 531 | )?; |
| 532 | c.succeeds_with(2, true)?; | 532 | c.succeeds_with(2, true, None)?; |
| 533 | p.expect("finding commits...\r\n")?; | 533 | p.expect("finding commits...\r\n")?; |
| 534 | let mut c = p.expect_choice( | 534 | let mut c = p.expect_choice( |
| 535 | "", | 535 | "", |
| @@ -541,7 +541,7 @@ mod when_main_branch_is_uptodate { | |||
| 541 | format!("back"), | 541 | format!("back"), |
| 542 | ], | 542 | ], |
| 543 | )?; | 543 | )?; |
| 544 | c.succeeds_with(0, false)?; | 544 | c.succeeds_with(0, false, Some(0))?; |
| 545 | p.expect(format!( | 545 | p.expect(format!( |
| 546 | "checked out proposal as '{FEATURE_BRANCH_NAME_3}' branch\r\n" | 546 | "checked out proposal as '{FEATURE_BRANCH_NAME_3}' branch\r\n" |
| 547 | ))?; | 547 | ))?; |
| @@ -651,7 +651,7 @@ mod when_main_branch_is_uptodate { | |||
| 651 | format!("add d3.md"), // commit msg title | 651 | format!("add d3.md"), // commit msg title |
| 652 | ], | 652 | ], |
| 653 | )?; | 653 | )?; |
| 654 | c.succeeds_with(3, true)?; | 654 | c.succeeds_with(3, true, None)?; |
| 655 | p.expect("finding commits...\r\n")?; | 655 | p.expect("finding commits...\r\n")?; |
| 656 | let mut c = p.expect_choice( | 656 | let mut c = p.expect_choice( |
| 657 | "", | 657 | "", |
| @@ -663,7 +663,7 @@ mod when_main_branch_is_uptodate { | |||
| 663 | format!("back"), | 663 | format!("back"), |
| 664 | ], | 664 | ], |
| 665 | )?; | 665 | )?; |
| 666 | c.succeeds_with(0, false)?; | 666 | c.succeeds_with(0, false, Some(0))?; |
| 667 | p.expect(format!( | 667 | p.expect(format!( |
| 668 | "checked out proposal as '{FEATURE_BRANCH_NAME_4}' branch\r\n" | 668 | "checked out proposal as '{FEATURE_BRANCH_NAME_4}' branch\r\n" |
| 669 | ))?; | 669 | ))?; |
| @@ -730,7 +730,7 @@ mod when_main_branch_is_uptodate { | |||
| 730 | format!("add d3.md"), // commit msg title | 730 | format!("add d3.md"), // commit msg title |
| 731 | ], | 731 | ], |
| 732 | )?; | 732 | )?; |
| 733 | c.succeeds_with(3, true)?; | 733 | c.succeeds_with(3, true, None)?; |
| 734 | p.expect("finding commits...\r\n")?; | 734 | p.expect("finding commits...\r\n")?; |
| 735 | let mut c = p.expect_choice( | 735 | let mut c = p.expect_choice( |
| 736 | "", | 736 | "", |
| @@ -742,7 +742,7 @@ mod when_main_branch_is_uptodate { | |||
| 742 | format!("back"), | 742 | format!("back"), |
| 743 | ], | 743 | ], |
| 744 | )?; | 744 | )?; |
| 745 | c.succeeds_with(0, false)?; | 745 | c.succeeds_with(0, false, Some(0))?; |
| 746 | p.expect(format!( | 746 | p.expect(format!( |
| 747 | "checked out proposal as '{FEATURE_BRANCH_NAME_4}' branch\r\n" | 747 | "checked out proposal as '{FEATURE_BRANCH_NAME_4}' branch\r\n" |
| 748 | ))?; | 748 | ))?; |
| @@ -861,7 +861,7 @@ mod when_main_branch_is_uptodate { | |||
| 861 | format!("\"{PROPOSAL_TITLE_3}\""), | 861 | format!("\"{PROPOSAL_TITLE_3}\""), |
| 862 | ], | 862 | ], |
| 863 | )?; | 863 | )?; |
| 864 | c.succeeds_with(0, true)?; | 864 | c.succeeds_with(0, true, None)?; |
| 865 | p.expect("finding commits...\r\n")?; | 865 | p.expect("finding commits...\r\n")?; |
| 866 | let mut c = p.expect_choice( | 866 | let mut c = p.expect_choice( |
| 867 | "", | 867 | "", |
| @@ -872,7 +872,7 @@ mod when_main_branch_is_uptodate { | |||
| 872 | format!("back"), | 872 | format!("back"), |
| 873 | ], | 873 | ], |
| 874 | )?; | 874 | )?; |
| 875 | c.succeeds_with(0, false)?; | 875 | c.succeeds_with(0, false, Some(0))?; |
| 876 | p.expect(format!( | 876 | p.expect(format!( |
| 877 | "checked out proposal as '{FEATURE_BRANCH_NAME_1}' branch\r\n" | 877 | "checked out proposal as '{FEATURE_BRANCH_NAME_1}' branch\r\n" |
| 878 | ))?; | 878 | ))?; |
| @@ -940,7 +940,7 @@ mod when_main_branch_is_uptodate { | |||
| 940 | format!("\"{PROPOSAL_TITLE_3}\""), | 940 | format!("\"{PROPOSAL_TITLE_3}\""), |
| 941 | ], | 941 | ], |
| 942 | )?; | 942 | )?; |
| 943 | c.succeeds_with(0, true)?; | 943 | c.succeeds_with(0, true, None)?; |
| 944 | p.expect("finding commits...\r\n")?; | 944 | p.expect("finding commits...\r\n")?; |
| 945 | let mut c = p.expect_choice( | 945 | let mut c = p.expect_choice( |
| 946 | "", | 946 | "", |
| @@ -951,7 +951,7 @@ mod when_main_branch_is_uptodate { | |||
| 951 | format!("back"), | 951 | format!("back"), |
| 952 | ], | 952 | ], |
| 953 | )?; | 953 | )?; |
| 954 | c.succeeds_with(0, false)?; | 954 | c.succeeds_with(0, false, Some(0))?; |
| 955 | p.expect(format!( | 955 | p.expect(format!( |
| 956 | "checked out proposal as '{FEATURE_BRANCH_NAME_1}' branch\r\n" | 956 | "checked out proposal as '{FEATURE_BRANCH_NAME_1}' branch\r\n" |
| 957 | ))?; | 957 | ))?; |
| @@ -1042,7 +1042,7 @@ mod when_main_branch_is_uptodate { | |||
| 1042 | format!("\"{PROPOSAL_TITLE_3}\""), | 1042 | format!("\"{PROPOSAL_TITLE_3}\""), |
| 1043 | ], | 1043 | ], |
| 1044 | )?; | 1044 | )?; |
| 1045 | c.succeeds_with(0, true)?; | 1045 | c.succeeds_with(0, true, None)?; |
| 1046 | p.expect("finding commits...\r\n")?; | 1046 | p.expect("finding commits...\r\n")?; |
| 1047 | let mut c = p.expect_choice( | 1047 | let mut c = p.expect_choice( |
| 1048 | "", | 1048 | "", |
| @@ -1053,7 +1053,7 @@ mod when_main_branch_is_uptodate { | |||
| 1053 | format!("back"), | 1053 | format!("back"), |
| 1054 | ], | 1054 | ], |
| 1055 | )?; | 1055 | )?; |
| 1056 | c.succeeds_with(0, false)?; | 1056 | c.succeeds_with(0, false, Some(0))?; |
| 1057 | p.expect("checked out proposal branch and applied 1 appendments (2 ahead 0 behind 'main')\r\n")?; | 1057 | p.expect("checked out proposal branch and applied 1 appendments (2 ahead 0 behind 'main')\r\n")?; |
| 1058 | p.expect_end()?; | 1058 | p.expect_end()?; |
| 1059 | 1059 | ||
| @@ -1120,7 +1120,7 @@ mod when_main_branch_is_uptodate { | |||
| 1120 | format!("\"{PROPOSAL_TITLE_3}\""), | 1120 | format!("\"{PROPOSAL_TITLE_3}\""), |
| 1121 | ], | 1121 | ], |
| 1122 | )?; | 1122 | )?; |
| 1123 | c.succeeds_with(0, true)?; | 1123 | c.succeeds_with(0, true, None)?; |
| 1124 | p.expect("finding commits...\r\n")?; | 1124 | p.expect("finding commits...\r\n")?; |
| 1125 | let mut c = p.expect_choice( | 1125 | let mut c = p.expect_choice( |
| 1126 | "", | 1126 | "", |
| @@ -1131,7 +1131,7 @@ mod when_main_branch_is_uptodate { | |||
| 1131 | format!("back"), | 1131 | format!("back"), |
| 1132 | ], | 1132 | ], |
| 1133 | )?; | 1133 | )?; |
| 1134 | c.succeeds_with(0, false)?; | 1134 | c.succeeds_with(0, false, Some(0))?; |
| 1135 | p.expect("checked out proposal branch and applied 1 appendments (2 ahead 0 behind 'main')\r\n")?; | 1135 | p.expect("checked out proposal branch and applied 1 appendments (2 ahead 0 behind 'main')\r\n")?; |
| 1136 | p.expect_end()?; | 1136 | p.expect_end()?; |
| 1137 | 1137 | ||