Simplify and make it not break on linux (#7813)
Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
@@ -400,12 +400,7 @@ fn parse_plan_command(input: String) -> Option<InputResult> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn get_input_prompt_string() -> String {
|
fn get_input_prompt_string() -> String {
|
||||||
let goose = "🪿";
|
"🪿 ".to_string()
|
||||||
if cfg!(target_os = "windows") {
|
|
||||||
format!("{goose} ")
|
|
||||||
} else {
|
|
||||||
format!("{} ", console::style(goose))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_help() {
|
fn print_help() {
|
||||||
@@ -692,20 +687,4 @@ mod tests {
|
|||||||
let result = handle_slash_command("/recipe /path/to/file.txt");
|
let result = handle_slash_command("/recipe /path/to/file.txt");
|
||||||
assert!(matches!(result, Some(InputResult::Retry)));
|
assert!(matches!(result, Some(InputResult::Retry)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_get_input_prompt_string() {
|
|
||||||
let prompt = get_input_prompt_string();
|
|
||||||
|
|
||||||
// Prompt should always end with a space
|
|
||||||
assert!(prompt.ends_with(' '));
|
|
||||||
|
|
||||||
// Prompt should contain the goose emoji
|
|
||||||
assert!(prompt.contains("🪿"));
|
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
|
||||||
{
|
|
||||||
assert_eq!(prompt, "🪿 ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user