mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
more: implement arguments -n/--lines and --number
This commit is contained in:
parent
b4f5a87f64
commit
6c98b23e80
2 changed files with 64 additions and 23 deletions
|
@ -20,6 +20,20 @@ fn test_valid_arg() {
|
|||
|
||||
new_ucmd!().arg("-s").succeeds();
|
||||
new_ucmd!().arg("--squeeze").succeeds();
|
||||
|
||||
new_ucmd!().arg("-n").arg("10").succeeds();
|
||||
new_ucmd!().arg("--lines").arg("0").succeeds();
|
||||
new_ucmd!().arg("--number").arg("0").succeeds();
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_invalid_arg() {
|
||||
if std::io::stdout().is_terminal() {
|
||||
new_ucmd!().arg("--invalid").fails();
|
||||
|
||||
new_ucmd!().arg("--lines").arg("-10").fails();
|
||||
new_ucmd!().arg("--number").arg("-10").fails();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue