upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/list.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/list.rs')
-rw-r--r--tests/list.rs100
1 files changed, 50 insertions, 50 deletions
diff --git a/tests/list.rs b/tests/list.rs
index b6bcd08..6d161ea 100644
--- a/tests/list.rs
+++ b/tests/list.rs
@@ -282,12 +282,12 @@ mod when_main_branch_is_uptodate {
282 let mut c = p.expect_choice( 282 let mut c = p.expect_choice(
283 "all proposals", 283 "all proposals",
284 vec![ 284 vec![
285 format!("\"{PROPOSAL_TITLE_1}\""),
286 format!("\"{PROPOSAL_TITLE_2}\""),
287 format!("\"{PROPOSAL_TITLE_3}\""), 285 format!("\"{PROPOSAL_TITLE_3}\""),
286 format!("\"{PROPOSAL_TITLE_2}\""),
287 format!("\"{PROPOSAL_TITLE_1}\""),
288 ], 288 ],
289 )?; 289 )?;
290 c.succeeds_with(0, true, None)?; 290 c.succeeds_with(2, true, None)?;
291 291
292 p.expect("finding commits...\r\n")?; 292 p.expect("finding commits...\r\n")?;
293 let mut c = p.expect_choice( 293 let mut c = p.expect_choice(
@@ -355,12 +355,12 @@ mod when_main_branch_is_uptodate {
355 let mut c = p.expect_choice( 355 let mut c = p.expect_choice(
356 "all proposals", 356 "all proposals",
357 vec![ 357 vec![
358 format!("\"{PROPOSAL_TITLE_1}\""),
359 format!("\"{PROPOSAL_TITLE_2}\""),
360 format!("\"{PROPOSAL_TITLE_3}\""), 358 format!("\"{PROPOSAL_TITLE_3}\""),
359 format!("\"{PROPOSAL_TITLE_2}\""),
360 format!("\"{PROPOSAL_TITLE_1}\""),
361 ], 361 ],
362 )?; 362 )?;
363 c.succeeds_with(0, true, None)?; 363 c.succeeds_with(2, true, None)?;
364 p.expect("finding commits...\r\n")?; 364 p.expect("finding commits...\r\n")?;
365 let mut c = p.expect_choice( 365 let mut c = p.expect_choice(
366 "", 366 "",
@@ -471,12 +471,12 @@ mod when_main_branch_is_uptodate {
471 let mut c = p.expect_choice( 471 let mut c = p.expect_choice(
472 "all proposals", 472 "all proposals",
473 vec![ 473 vec![
474 format!("\"{PROPOSAL_TITLE_1}\""),
475 format!("\"{PROPOSAL_TITLE_2}\""),
476 format!("\"{PROPOSAL_TITLE_3}\""), 474 format!("\"{PROPOSAL_TITLE_3}\""),
475 format!("\"{PROPOSAL_TITLE_2}\""),
476 format!("\"{PROPOSAL_TITLE_1}\""),
477 ], 477 ],
478 )?; 478 )?;
479 c.succeeds_with(2, true, None)?; 479 c.succeeds_with(0, true, None)?;
480 480
481 p.expect("finding commits...\r\n")?; 481 p.expect("finding commits...\r\n")?;
482 let mut c = p.expect_choice( 482 let mut c = p.expect_choice(
@@ -545,12 +545,12 @@ mod when_main_branch_is_uptodate {
545 let mut c = p.expect_choice( 545 let mut c = p.expect_choice(
546 "all proposals", 546 "all proposals",
547 vec![ 547 vec![
548 format!("\"{PROPOSAL_TITLE_1}\""),
549 format!("\"{PROPOSAL_TITLE_2}\""),
550 format!("\"{PROPOSAL_TITLE_3}\""), 548 format!("\"{PROPOSAL_TITLE_3}\""),
549 format!("\"{PROPOSAL_TITLE_2}\""),
550 format!("\"{PROPOSAL_TITLE_1}\""),
551 ], 551 ],
552 )?; 552 )?;
553 c.succeeds_with(2, true, None)?; 553 c.succeeds_with(0, true, None)?;
554 p.expect("finding commits...\r\n")?; 554 p.expect("finding commits...\r\n")?;
555 let mut c = p.expect_choice( 555 let mut c = p.expect_choice(
556 "", 556 "",
@@ -667,13 +667,13 @@ mod when_main_branch_is_uptodate {
667 let mut c = p.expect_choice( 667 let mut c = p.expect_choice(
668 "all proposals", 668 "all proposals",
669 vec![ 669 vec![
670 format!("\"{PROPOSAL_TITLE_1}\""),
671 format!("\"{PROPOSAL_TITLE_2}\""),
672 format!("\"{PROPOSAL_TITLE_3}\""),
673 format!("add d3.md"), // commit msg title 670 format!("add d3.md"), // commit msg title
671 format!("\"{PROPOSAL_TITLE_3}\""),
672 format!("\"{PROPOSAL_TITLE_2}\""),
673 format!("\"{PROPOSAL_TITLE_1}\""),
674 ], 674 ],
675 )?; 675 )?;
676 c.succeeds_with(3, true, None)?; 676 c.succeeds_with(0, true, None)?;
677 p.expect("finding commits...\r\n")?; 677 p.expect("finding commits...\r\n")?;
678 let mut c = p.expect_choice( 678 let mut c = p.expect_choice(
679 "", 679 "",
@@ -747,13 +747,13 @@ mod when_main_branch_is_uptodate {
747 let mut c = p.expect_choice( 747 let mut c = p.expect_choice(
748 "all proposals", 748 "all proposals",
749 vec![ 749 vec![
750 format!("\"{PROPOSAL_TITLE_1}\""),
751 format!("\"{PROPOSAL_TITLE_2}\""),
752 format!("\"{PROPOSAL_TITLE_3}\""),
753 format!("add d3.md"), // commit msg title 750 format!("add d3.md"), // commit msg title
751 format!("\"{PROPOSAL_TITLE_3}\""),
752 format!("\"{PROPOSAL_TITLE_2}\""),
753 format!("\"{PROPOSAL_TITLE_1}\""),
754 ], 754 ],
755 )?; 755 )?;
756 c.succeeds_with(3, true, None)?; 756 c.succeeds_with(0, true, None)?;
757 p.expect("finding commits...\r\n")?; 757 p.expect("finding commits...\r\n")?;
758 let mut c = p.expect_choice( 758 let mut c = p.expect_choice(
759 "", 759 "",
@@ -879,12 +879,12 @@ mod when_main_branch_is_uptodate {
879 let mut c = p.expect_choice( 879 let mut c = p.expect_choice(
880 "all proposals", 880 "all proposals",
881 vec![ 881 vec![
882 format!("\"{PROPOSAL_TITLE_1}\""),
883 format!("\"{PROPOSAL_TITLE_2}\""),
884 format!("\"{PROPOSAL_TITLE_3}\""), 882 format!("\"{PROPOSAL_TITLE_3}\""),
883 format!("\"{PROPOSAL_TITLE_2}\""),
884 format!("\"{PROPOSAL_TITLE_1}\""),
885 ], 885 ],
886 )?; 886 )?;
887 c.succeeds_with(0, true, None)?; 887 c.succeeds_with(2, true, None)?;
888 p.expect("finding commits...\r\n")?; 888 p.expect("finding commits...\r\n")?;
889 let mut c = p.expect_choice( 889 let mut c = p.expect_choice(
890 "", 890 "",
@@ -958,12 +958,12 @@ mod when_main_branch_is_uptodate {
958 let mut c = p.expect_choice( 958 let mut c = p.expect_choice(
959 "all proposals", 959 "all proposals",
960 vec![ 960 vec![
961 format!("\"{PROPOSAL_TITLE_1}\""),
962 format!("\"{PROPOSAL_TITLE_2}\""),
963 format!("\"{PROPOSAL_TITLE_3}\""), 961 format!("\"{PROPOSAL_TITLE_3}\""),
962 format!("\"{PROPOSAL_TITLE_2}\""),
963 format!("\"{PROPOSAL_TITLE_1}\""),
964 ], 964 ],
965 )?; 965 )?;
966 c.succeeds_with(0, true, None)?; 966 c.succeeds_with(2, true, None)?;
967 p.expect("finding commits...\r\n")?; 967 p.expect("finding commits...\r\n")?;
968 let mut c = p.expect_choice( 968 let mut c = p.expect_choice(
969 "", 969 "",
@@ -1060,12 +1060,12 @@ mod when_main_branch_is_uptodate {
1060 let mut c = p.expect_choice( 1060 let mut c = p.expect_choice(
1061 "all proposals", 1061 "all proposals",
1062 vec![ 1062 vec![
1063 format!("\"{PROPOSAL_TITLE_1}\""),
1064 format!("\"{PROPOSAL_TITLE_2}\""),
1065 format!("\"{PROPOSAL_TITLE_3}\""), 1063 format!("\"{PROPOSAL_TITLE_3}\""),
1064 format!("\"{PROPOSAL_TITLE_2}\""),
1065 format!("\"{PROPOSAL_TITLE_1}\""),
1066 ], 1066 ],
1067 )?; 1067 )?;
1068 c.succeeds_with(0, true, None)?; 1068 c.succeeds_with(2, true, None)?;
1069 p.expect("finding commits...\r\n")?; 1069 p.expect("finding commits...\r\n")?;
1070 let mut c = p.expect_choice( 1070 let mut c = p.expect_choice(
1071 "", 1071 "",
@@ -1138,12 +1138,12 @@ mod when_main_branch_is_uptodate {
1138 let mut c = p.expect_choice( 1138 let mut c = p.expect_choice(
1139 "all proposals", 1139 "all proposals",
1140 vec![ 1140 vec![
1141 format!("\"{PROPOSAL_TITLE_1}\""),
1142 format!("\"{PROPOSAL_TITLE_2}\""),
1143 format!("\"{PROPOSAL_TITLE_3}\""), 1141 format!("\"{PROPOSAL_TITLE_3}\""),
1142 format!("\"{PROPOSAL_TITLE_2}\""),
1143 format!("\"{PROPOSAL_TITLE_1}\""),
1144 ], 1144 ],
1145 )?; 1145 )?;
1146 c.succeeds_with(0, true, None)?; 1146 c.succeeds_with(2, true, None)?;
1147 p.expect("finding commits...\r\n")?; 1147 p.expect("finding commits...\r\n")?;
1148 let mut c = p.expect_choice( 1148 let mut c = p.expect_choice(
1149 "", 1149 "",
@@ -1257,12 +1257,12 @@ mod when_main_branch_is_uptodate {
1257 let mut c = p.expect_choice( 1257 let mut c = p.expect_choice(
1258 "all proposals", 1258 "all proposals",
1259 vec![ 1259 vec![
1260 format!("\"{PROPOSAL_TITLE_1}\""),
1261 format!("\"{PROPOSAL_TITLE_2}\""),
1262 format!("\"{PROPOSAL_TITLE_3}\""), 1260 format!("\"{PROPOSAL_TITLE_3}\""),
1261 format!("\"{PROPOSAL_TITLE_2}\""),
1262 format!("\"{PROPOSAL_TITLE_1}\""),
1263 ], 1263 ],
1264 )?; 1264 )?;
1265 c.succeeds_with(0, true, None)?; 1265 c.succeeds_with(2, true, None)?;
1266 p.expect("finding commits...\r\n")?; 1266 p.expect("finding commits...\r\n")?;
1267 p.expect_eventually("--force`\r\n")?; 1267 p.expect_eventually("--force`\r\n")?;
1268 1268
@@ -1346,12 +1346,12 @@ mod when_main_branch_is_uptodate {
1346 let mut c = p.expect_choice( 1346 let mut c = p.expect_choice(
1347 "all proposals", 1347 "all proposals",
1348 vec![ 1348 vec![
1349 format!("\"{PROPOSAL_TITLE_1}\""),
1350 format!("\"{PROPOSAL_TITLE_2}\""),
1351 format!("\"{PROPOSAL_TITLE_3}\""), 1349 format!("\"{PROPOSAL_TITLE_3}\""),
1350 format!("\"{PROPOSAL_TITLE_2}\""),
1351 format!("\"{PROPOSAL_TITLE_1}\""),
1352 ], 1352 ],
1353 )?; 1353 )?;
1354 c.succeeds_with(0, true, None)?; 1354 c.succeeds_with(2, true, None)?;
1355 p.expect("finding commits...\r\n")?; 1355 p.expect("finding commits...\r\n")?;
1356 p.expect("you have an amended/rebase version the proposal that is unpublished\r\n")?; 1356 p.expect("you have an amended/rebase version the proposal that is unpublished\r\n")?;
1357 p.expect("you have previously applied the latest version of the proposal (2 ahead 0 behind 'main') but your local proposal branch has amended or rebased it (2 ahead 0 behind 'main')\r\n")?; 1357 p.expect("you have previously applied the latest version of the proposal (2 ahead 0 behind 'main') but your local proposal branch has amended or rebased it (2 ahead 0 behind 'main')\r\n")?;
@@ -1460,12 +1460,12 @@ mod when_main_branch_is_uptodate {
1460 let mut c = p.expect_choice( 1460 let mut c = p.expect_choice(
1461 "all proposals", 1461 "all proposals",
1462 vec![ 1462 vec![
1463 format!("\"{PROPOSAL_TITLE_1}\""),
1464 format!("\"{PROPOSAL_TITLE_2}\""),
1465 format!("\"{PROPOSAL_TITLE_3}\""), 1463 format!("\"{PROPOSAL_TITLE_3}\""),
1464 format!("\"{PROPOSAL_TITLE_2}\""),
1465 format!("\"{PROPOSAL_TITLE_1}\""),
1466 ], 1466 ],
1467 )?; 1467 )?;
1468 c.succeeds_with(0, true, None)?; 1468 c.succeeds_with(2, true, None)?;
1469 p.expect("finding commits...\r\n")?; 1469 p.expect("finding commits...\r\n")?;
1470 p.expect( 1470 p.expect(
1471 "local proposal branch exists with 1 unpublished commits on top of the most up-to-date version of the proposal (3 ahead 0 behind 'main')\r\n", 1471 "local proposal branch exists with 1 unpublished commits on top of the most up-to-date version of the proposal (3 ahead 0 behind 'main')\r\n",
@@ -1543,12 +1543,12 @@ mod when_main_branch_is_uptodate {
1543 let mut c = p.expect_choice( 1543 let mut c = p.expect_choice(
1544 "all proposals", 1544 "all proposals",
1545 vec![ 1545 vec![
1546 format!("\"{PROPOSAL_TITLE_1}\""),
1547 format!("\"{PROPOSAL_TITLE_2}\""),
1548 format!("\"{PROPOSAL_TITLE_3}\""), 1546 format!("\"{PROPOSAL_TITLE_3}\""),
1547 format!("\"{PROPOSAL_TITLE_2}\""),
1548 format!("\"{PROPOSAL_TITLE_1}\""),
1549 ], 1549 ],
1550 )?; 1550 )?;
1551 c.succeeds_with(0, true, None)?; 1551 c.succeeds_with(2, true, None)?;
1552 p.expect("finding commits...\r\n")?; 1552 p.expect("finding commits...\r\n")?;
1553 p.expect( 1553 p.expect(
1554 "local proposal branch exists with 1 unpublished commits on top of the most up-to-date version of the proposal (3 ahead 0 behind 'main')\r\n", 1554 "local proposal branch exists with 1 unpublished commits on top of the most up-to-date version of the proposal (3 ahead 0 behind 'main')\r\n",
@@ -1702,12 +1702,12 @@ mod when_main_branch_is_uptodate {
1702 let mut c = p.expect_choice( 1702 let mut c = p.expect_choice(
1703 "all proposals", 1703 "all proposals",
1704 vec![ 1704 vec![
1705 format!("\"{PROPOSAL_TITLE_1}\""),
1706 format!("\"{PROPOSAL_TITLE_2}\""),
1707 format!("\"{PROPOSAL_TITLE_3}\""), 1705 format!("\"{PROPOSAL_TITLE_3}\""),
1706 format!("\"{PROPOSAL_TITLE_2}\""),
1707 format!("\"{PROPOSAL_TITLE_1}\""),
1708 ], 1708 ],
1709 )?; 1709 )?;
1710 c.succeeds_with(0, true, None)?; 1710 c.succeeds_with(2, true, None)?;
1711 p.expect("finding commits...\r\n")?; 1711 p.expect("finding commits...\r\n")?;
1712 p.expect("updated proposal available (2 ahead 0 behind 'main'). existing version is 2 ahead 1 behind 'main'\r\n")?; 1712 p.expect("updated proposal available (2 ahead 0 behind 'main'). existing version is 2 ahead 1 behind 'main'\r\n")?;
1713 let mut c = p.expect_choice( 1713 let mut c = p.expect_choice(
@@ -1826,12 +1826,12 @@ mod when_main_branch_is_uptodate {
1826 let mut c = p.expect_choice( 1826 let mut c = p.expect_choice(
1827 "all proposals", 1827 "all proposals",
1828 vec![ 1828 vec![
1829 format!("\"{PROPOSAL_TITLE_1}\""),
1830 format!("\"{PROPOSAL_TITLE_2}\""),
1831 format!("\"{PROPOSAL_TITLE_3}\""), 1829 format!("\"{PROPOSAL_TITLE_3}\""),
1830 format!("\"{PROPOSAL_TITLE_2}\""),
1831 format!("\"{PROPOSAL_TITLE_1}\""),
1832 ], 1832 ],
1833 )?; 1833 )?;
1834 c.succeeds_with(0, true, None)?; 1834 c.succeeds_with(2, true, None)?;
1835 p.expect("finding commits...\r\n")?; 1835 p.expect("finding commits...\r\n")?;
1836 p.expect("updated proposal available (2 ahead 0 behind 'main'). existing version is 2 ahead 1 behind 'main'\r\n")?; 1836 p.expect("updated proposal available (2 ahead 0 behind 'main'). existing version is 2 ahead 1 behind 'main'\r\n")?;
1837 let mut c = p.expect_choice( 1837 let mut c = p.expect_choice(