1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

echo: print help if not posixly corrent and only argument is --help

This commit is contained in:
RGBCube 2025-07-03 21:37:10 +03:00
parent f1436f3949
commit 3ea679a29e
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
3 changed files with 30 additions and 32 deletions

View file

@ -514,6 +514,12 @@ fn partial_help_argument() {
new_ucmd!().arg("--he").succeeds().stdout_is("--he\n");
}
#[test]
fn only_help_argument_prints_help() {
assert_ne!(new_ucmd!().arg("--help").succeeds().stdout(), b"--help\n");
assert_ne!(new_ucmd!().arg("--help").succeeds().stdout(), b"--help"); // This one is just in case.
}
#[test]
fn multibyte_escape_unicode() {
// spell-checker:disable-next-line