mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tr: generate an error for real if the input is a directory
This commit is contained in:
parent
8a481ccf1c
commit
3e4221a461
4 changed files with 45 additions and 4 deletions
|
@ -20,6 +20,14 @@ fn test_invalid_input() {
|
|||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_contains("tr: extra operand '<'");
|
||||
#[cfg(unix)]
|
||||
new_ucmd!()
|
||||
.args(&["1", "1"])
|
||||
// will test "tr 1 1 < ."
|
||||
.set_stdin(std::process::Stdio::from(std::fs::File::open(".").unwrap()))
|
||||
.fails()
|
||||
.code_is(1)
|
||||
.stderr_contains("tr: read error: Is a directory");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue