From 141ebf0cc0c6cfea640debc9b9073303509a8bc7 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 20 Feb 2024 16:22:10 +0000 Subject: 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... --- test_utils/src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'test_utils/src/lib.rs') diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs index 089b052..3808a02 100644 --- a/test_utils/src/lib.rs +++ b/test_utils/src/lib.rs @@ -479,7 +479,16 @@ impl CliTesterChoicePrompt<'_> { Ok(self) } - pub fn succeeds_with(&mut self, chosen_index: u64, report: bool) -> Result<&mut Self> { + pub fn succeeds_with( + &mut self, + chosen_index: u64, + report: bool, + default_index: Option, + ) -> Result<&mut Self> { + if default_index.is_some() { + println!("TODO: add support for default choice") + } + fn show_options( tester: &mut CliTester, choices: &Vec, -- cgit v1.2.3