diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-03-01 14:49:48 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-03-01 14:49:48 +0000 |
| commit | 8519dc4a10d47747e6df3f47e25c36bf16befe00 (patch) | |
| tree | 7394f50fa741bac8bde4f7d2a6fb41577718cc17 | |
| parent | 445eea13d987b345535fd4fa56486ff334bbd351 (diff) | |
feat(send): fix grammar in cli output
refer to a single patch as patch rather than patches
| -rw-r--r-- | src/sub_commands/send.rs | 9 | ||||
| -rw-r--r-- | tests/send.rs | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/sub_commands/send.rs b/src/sub_commands/send.rs index 6417870..2a6c220 100644 --- a/src/sub_commands/send.rs +++ b/src/sub_commands/send.rs | |||
| @@ -178,12 +178,19 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 178 | )?; | 178 | )?; |
| 179 | 179 | ||
| 180 | println!( | 180 | println!( |
| 181 | "posting {} patches {} a covering letter...", | 181 | "posting {} patch{} {} a covering letter...", |
| 182 | if cover_letter_title_description.is_none() { | 182 | if cover_letter_title_description.is_none() { |
| 183 | events.len() | 183 | events.len() |
| 184 | } else { | 184 | } else { |
| 185 | events.len() - 1 | 185 | events.len() - 1 |
| 186 | }, | 186 | }, |
| 187 | if cover_letter_title_description.is_none() && events.len().eq(&1) | ||
| 188 | || cover_letter_title_description.is_some() && events.len().eq(&2) | ||
| 189 | { | ||
| 190 | "es" | ||
| 191 | } else { | ||
| 192 | "" | ||
| 193 | }, | ||
| 187 | if cover_letter_title_description.is_none() { | 194 | if cover_letter_title_description.is_none() { |
| 188 | "without" | 195 | "without" |
| 189 | } else { | 196 | } else { |
diff --git a/tests/send.rs b/tests/send.rs index 2d02a7d..4e1adf4 100644 --- a/tests/send.rs +++ b/tests/send.rs | |||
| @@ -1169,7 +1169,7 @@ mod when_on_main_branch_defaults_to_last_commit { | |||
| 1169 | p.expect("searching for profile and relay updates...\r\n")?; | 1169 | p.expect("searching for profile and relay updates...\r\n")?; |
| 1170 | p.expect("\r")?; | 1170 | p.expect("\r")?; |
| 1171 | p.expect("logged in as fred\r\n")?; | 1171 | p.expect("logged in as fred\r\n")?; |
| 1172 | p.expect("posting 1 patches without a covering letter...\r\n")?; | 1172 | p.expect("posting 1 patch without a covering letter...\r\n")?; |
| 1173 | Ok(()) | 1173 | Ok(()) |
| 1174 | } | 1174 | } |
| 1175 | async fn prep_run_create_proposal() -> Result<( | 1175 | async fn prep_run_create_proposal() -> Result<( |