1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

all: add tests for usage error exit code

This commit is contained in:
Terts Diepraam 2022-09-10 18:38:14 +02:00
parent 975a1d170d
commit 9177cb7b24
74 changed files with 371 additions and 0 deletions

View file

@ -30,6 +30,11 @@ static FOLLOW_NAME_SHORT_EXP: &str = "follow_name_short.expected";
#[cfg(target_os = "linux")]
static FOLLOW_NAME_EXP: &str = "follow_name.expected";
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
}
#[test]
#[cfg(all(unix, not(target_os = "android")))] // FIXME: fix this test for Android
fn test_stdin_default() {