From 4ee83e2fe5335a8afd78439c35f029c4a472e797 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 16 Dec 2024 09:00:46 +0000 Subject: chore: bump nix flake rust nightly `fmt` overlay update the rust nightly `fmt` overlay which needs to be pinned to a specific version (this case by date) update formatting in main files via `cargo fmt` --- tests/ngit_list.rs | 488 +++++++++++++++++++++-------------------------------- 1 file changed, 197 insertions(+), 291 deletions(-) (limited to 'tests/ngit_list.rs') diff --git a/tests/ngit_list.rs b/tests/ngit_list.rs index 1d297b6..4a3aad5 100644 --- a/tests/ngit_list.rs +++ b/tests/ngit_list.rs @@ -49,7 +49,7 @@ async fn prep_proposals_repo_and_repo_with_proposal_pulled_and_checkedout( mod cannot_find_repo_event { use super::*; mod cli_prompts { - use nostr::{nips::nip01::Coordinate, ToBech32}; + use nostr::{ToBech32, nips::nip01::Coordinate}; use nostr_sdk::RelayUrl; use super::*; @@ -196,25 +196,20 @@ mod when_main_branch_is_uptodate { p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; - let mut c = p.expect_choice( - "", - vec![ - format!( - "create and checkout proposal branch (2 ahead 0 behind 'main')" ), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!( + "create and checkout proposal branch (2 ahead 0 behind 'main')" + ), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, None)?; p.expect(format!( "checked out proposal as 'pr/{}(", @@ -318,25 +313,20 @@ mod when_main_branch_is_uptodate { p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(0, true, None)?; - let mut c = p.expect_choice( - "", - vec![ - format!( - "create and checkout proposal branch (2 ahead 0 behind 'main')" ), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!( + "create and checkout proposal branch (2 ahead 0 behind 'main')" + ), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect(format!( "checked out proposal as 'pr/{}(", @@ -427,8 +417,8 @@ mod when_main_branch_is_uptodate { r55.events.push(generate_test_key_1_metadata_event("fred")); r55.events.push(generate_test_key_1_relay_list_event()); - let cli_tester_handle = std::thread::spawn( - move || -> Result<(GitTestRepo, GitTestRepo)> { + let cli_tester_handle = + std::thread::spawn(move || -> Result<(GitTestRepo, GitTestRepo)> { let originating_repo = cli_tester_create_proposals()?; cli_tester_create_proposal( &originating_repo, @@ -443,26 +433,21 @@ mod when_main_branch_is_uptodate { p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("add d3.md"), // commit msg title - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("add d3.md"), // commit msg title + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(0, true, None)?; - let mut c = p.expect_choice( - "", - vec![ - format!( - "create and checkout proposal branch (2 ahead 0 behind 'main')" ), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!( + "create and checkout proposal branch (2 ahead 0 behind 'main')" + ), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect_end_eventually_and_print()?; @@ -470,8 +455,7 @@ mod when_main_branch_is_uptodate { relay::shutdown_relay(8000 + p)?; } Ok((originating_repo, test_repo)) - }, - ); + }); // launch relay let _ = join!( @@ -524,26 +508,21 @@ mod when_main_branch_is_uptodate { p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("add d3.md"), // commit msg title - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("add d3.md"), // commit msg title + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(0, true, None)?; - let mut c = p.expect_choice( - "", - vec![ - format!( - "create and checkout proposal branch (2 ahead 0 behind 'main')" ), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!( + "create and checkout proposal branch (2 ahead 0 behind 'main')" + ), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect(format!( "checked out proposal as 'pr/{}(", @@ -639,8 +618,8 @@ mod when_main_branch_is_uptodate { r55.events.push(generate_test_key_1_metadata_event("fred")); r55.events.push(generate_test_key_1_relay_list_event()); - let cli_tester_handle = std::thread::spawn( - move || -> Result<(GitTestRepo, GitTestRepo)> { + let cli_tester_handle = + std::thread::spawn(move || -> Result<(GitTestRepo, GitTestRepo)> { let originating_repo = cli_tester_create_proposals()?; let test_repo = GitTestRepo::default(); @@ -649,24 +628,20 @@ mod when_main_branch_is_uptodate { let mut p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; - let mut c = p.expect_choice( - "", - vec![ - format!("create and checkout proposal branch (2 ahead 0 behind 'main')"), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!( + "create and checkout proposal branch (2 ahead 0 behind 'main')" + ), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect_end_eventually()?; @@ -675,24 +650,18 @@ mod when_main_branch_is_uptodate { p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; - let mut c = p.expect_choice( - "", - vec![ - format!("checkout proposal branch (2 ahead 0 behind 'main')"), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!("checkout proposal branch (2 ahead 0 behind 'main')"), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect_end_eventually_and_print()?; @@ -700,8 +669,7 @@ mod when_main_branch_is_uptodate { relay::shutdown_relay(8000 + p)?; } Ok((originating_repo, test_repo)) - }, - ); + }); // launch relay let _ = join!( @@ -747,24 +715,20 @@ mod when_main_branch_is_uptodate { let mut p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; - let mut c = p.expect_choice( - "", - vec![ - format!("create and checkout proposal branch (2 ahead 0 behind 'main')"), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!( + "create and checkout proposal branch (2 ahead 0 behind 'main')" + ), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect_end_eventually()?; @@ -773,24 +737,18 @@ mod when_main_branch_is_uptodate { p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; - let mut c = p.expect_choice( - "", - vec![ - format!("checkout proposal branch (2 ahead 0 behind 'main')"), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!("checkout proposal branch (2 ahead 0 behind 'main')"), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect(format!( "checked out proposal as 'pr/{}(", @@ -864,24 +822,18 @@ mod when_main_branch_is_uptodate { let mut p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; - let mut c = p.expect_choice( - "", - vec![ - format!("checkout proposal branch and apply 1 appendments"), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!("checkout proposal branch and apply 1 appendments"), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect("checked out proposal branch and applied 1 appendments (2 ahead 0 behind 'main')\r\n")?; p.expect_end()?; @@ -940,24 +892,18 @@ mod when_main_branch_is_uptodate { let mut p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; - let mut c = p.expect_choice( - "", - vec![ - format!("checkout proposal branch and apply 1 appendments"), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!("checkout proposal branch and apply 1 appendments"), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect("checked out proposal branch and applied 1 appendments (2 ahead 0 behind 'main')\r\n")?; p.expect_end()?; @@ -1053,29 +999,21 @@ mod when_main_branch_is_uptodate { let mut p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; p.expect_eventually("--force`\r\n")?; - let mut c = p.expect_choice( - "", - vec![ - format!("checkout local branch with unpublished changes"), - format!( - "discard unpublished changes and checkout new revision" - ), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - "back".to_string(), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!("checkout local branch with unpublished changes"), + format!("discard unpublished changes and checkout new revision"), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + "back".to_string(), + ])?; c.succeeds_with(1, true, Some(0))?; p.expect_end_eventually_and_print()?; @@ -1132,14 +1070,11 @@ mod when_main_branch_is_uptodate { let mut p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; p.expect("you have an amended/rebase version the proposal that is unpublished\r\n")?; 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")?; @@ -1148,18 +1083,13 @@ mod when_main_branch_is_uptodate { p.expect(" 2) run `ngit list` and checkout the latest published version of this proposal\r\n")?; p.expect("if you are confident in your changes consider running `ngit push --force`\r\n")?; - let mut c = p.expect_choice( - "", - vec![ - format!("checkout local branch with unpublished changes"), - format!( - "discard unpublished changes and checkout new revision" - ), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - "back".to_string(), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!("checkout local branch with unpublished changes"), + format!("discard unpublished changes and checkout new revision"), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + "back".to_string(), + ])?; c.succeeds_with(1, true, Some(1))?; p.expect_end_with("checked out latest version of proposal (2 ahead 0 behind 'main'), replacing unpublished version (2 ahead 0 behind 'main')\r\n")?; @@ -1237,26 +1167,20 @@ mod when_main_branch_is_uptodate { let mut p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; p.expect( "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", )?; - let mut c = p.expect_choice( - "", - vec![ - format!("checkout proposal branch with 1 unpublished commits"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!("checkout proposal branch with 1 unpublished commits"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect("checked out proposal branch with 1 unpublished commits (3 ahead 0 behind 'main')\r\n")?; p.expect_end()?; @@ -1319,26 +1243,20 @@ mod when_main_branch_is_uptodate { let mut p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; p.expect( "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", )?; - let mut c = p.expect_choice( - "", - vec![ - format!("checkout proposal branch with 1 unpublished commits"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!("checkout proposal branch with 1 unpublished commits"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect("checked out proposal branch with 1 unpublished commits (3 ahead 0 behind 'main')\r\n")?; p.expect_end()?; @@ -1421,26 +1339,20 @@ mod when_main_branch_is_uptodate { let mut p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; p.expect("updated proposal available (2 ahead 0 behind 'main'). existing version is 2 ahead 1 behind 'main'\r\n")?; - let mut c = p.expect_choice( - "", - vec![ - format!("checkout and overwrite existing proposal branch"), - format!("checkout existing outdated proposal branch"), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!("checkout and overwrite existing proposal branch"), + format!("checkout existing outdated proposal branch"), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect("checked out new version of proposal (2 ahead 0 behind 'main'), replacing old version (2 ahead 1 behind 'main')\r\n")?; p.expect_end()?; @@ -1494,26 +1406,20 @@ mod when_main_branch_is_uptodate { let mut p = CliTester::new_from_dir(&test_repo.dir, ["list"]); p.expect("fetching updates...\r\n")?; p.expect_eventually("\r\n")?; // some updates listed here - let mut c = p.expect_choice( - "all proposals", - vec![ - format!("\"{PROPOSAL_TITLE_3}\""), - format!("\"{PROPOSAL_TITLE_2}\""), - format!("\"{PROPOSAL_TITLE_1}\""), - ], - )?; + let mut c = p.expect_choice("all proposals", vec![ + format!("\"{PROPOSAL_TITLE_3}\""), + format!("\"{PROPOSAL_TITLE_2}\""), + format!("\"{PROPOSAL_TITLE_1}\""), + ])?; c.succeeds_with(2, true, None)?; p.expect("updated proposal available (2 ahead 0 behind 'main'). existing version is 2 ahead 1 behind 'main'\r\n")?; - let mut c = p.expect_choice( - "", - vec![ - format!("checkout and overwrite existing proposal branch"), - format!("checkout existing outdated proposal branch"), - format!("apply to current branch with `git am`"), - format!("download to ./patches"), - format!("back"), - ], - )?; + let mut c = p.expect_choice("", vec![ + format!("checkout and overwrite existing proposal branch"), + format!("checkout existing outdated proposal branch"), + format!("apply to current branch with `git am`"), + format!("download to ./patches"), + format!("back"), + ])?; c.succeeds_with(0, true, Some(0))?; p.expect("checked out new version of proposal (2 ahead 0 behind 'main'), replacing old version (2 ahead 1 behind 'main')\r\n")?; p.expect_end()?; -- cgit v1.2.3