mirror of
https://github.com/uutils/coreutils
synced 2025-01-21 01:24:40 +00:00
pathchk: simplify and rename test
This commit is contained in:
parent
cd9863dd29
commit
49154669a6
1 changed files with 8 additions and 7 deletions
|
@ -4,6 +4,14 @@
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
use crate::common::util::TestScenario;
|
use crate::common::util::TestScenario;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_no_args() {
|
||||||
|
new_ucmd!()
|
||||||
|
.fails()
|
||||||
|
.no_stdout()
|
||||||
|
.stderr_contains("pathchk: missing operand");
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_invalid_arg() {
|
fn test_invalid_arg() {
|
||||||
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
|
new_ucmd!().arg("--definitely-invalid").fails().code_is(1);
|
||||||
|
@ -164,10 +172,3 @@ fn test_posix_all() {
|
||||||
// fail on empty path
|
// fail on empty path
|
||||||
new_ucmd!().args(&["-p", "-P", ""]).fails().no_stdout();
|
new_ucmd!().args(&["-p", "-P", ""]).fails().no_stdout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_args_parsing() {
|
|
||||||
// fail on no args
|
|
||||||
let empty_args: [String; 0] = [];
|
|
||||||
new_ucmd!().args(&empty_args).fails().no_stdout();
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue