mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tr: generate an error if the input is a directory (#6855)
* tr: generate an error if the input is a directory tested by tests/misc/read-errors * tr: improve the test * tr: take the commentinto account
This commit is contained in:
parent
37fb0a02f8
commit
2ad3c45230
3 changed files with 31 additions and 12 deletions
|
@ -13,6 +13,15 @@ fn test_invalid_arg() {
|
|||
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_invalid_input() {
|
||||
new_ucmd!()
|
||||
.args(&["1", "1", "<", "."])
|
||||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_contains("tr: extra operand '<'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_to_upper() {
|
||||
new_ucmd!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue