mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
csplit: run the file check before the arguments verifications
This commit is contained in:
parent
8551c55ab3
commit
b49fbd9a21
2 changed files with 12 additions and 3 deletions
|
@ -1362,8 +1362,17 @@ fn precision_format() {
|
|||
|
||||
#[test]
|
||||
fn zero_error() {
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
at.touch("in");
|
||||
ucmd.args(&["in", "0"])
|
||||
.fails()
|
||||
.stderr_contains("0: line number must be greater");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_such_file() {
|
||||
let (_, mut ucmd) = at_and_ucmd!();
|
||||
ucmd.args(&["in", "0"])
|
||||
.fails()
|
||||
.stderr_contains("cannot access 'in': No such file or directory");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue