mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
csplit: add support for -q
This commit is contained in:
parent
b9742067fe
commit
db37c316af
2 changed files with 18 additions and 12 deletions
|
@ -621,8 +621,9 @@ pub fn uu_app() -> Command {
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new(options::QUIET)
|
Arg::new(options::QUIET)
|
||||||
.short('s')
|
.short('q')
|
||||||
.long(options::QUIET)
|
.long(options::QUIET)
|
||||||
|
.visible_short_alias('s')
|
||||||
.visible_alias("silent")
|
.visible_alias("silent")
|
||||||
.help("do not print counts of output file sizes")
|
.help("do not print counts of output file sizes")
|
||||||
.action(ArgAction::SetTrue),
|
.action(ArgAction::SetTrue),
|
||||||
|
|
|
@ -387,8 +387,9 @@ fn test_option_keep() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_option_quiet() {
|
fn test_option_quiet() {
|
||||||
|
for arg in ["-q", "--quiet", "-s", "--silent"] {
|
||||||
let (at, mut ucmd) = at_and_ucmd!();
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
ucmd.args(&["--quiet", "numbers50.txt", "13", "%25%", "/0$/"])
|
ucmd.args(&[arg, "numbers50.txt", "13", "%25%", "/0$/"])
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.no_stdout();
|
.no_stdout();
|
||||||
|
|
||||||
|
@ -399,6 +400,10 @@ fn test_option_quiet() {
|
||||||
assert_eq!(at.read("xx00"), generate(1, 13));
|
assert_eq!(at.read("xx00"), generate(1, 13));
|
||||||
assert_eq!(at.read("xx01"), generate(25, 30));
|
assert_eq!(at.read("xx01"), generate(25, 30));
|
||||||
assert_eq!(at.read("xx02"), generate(30, 51));
|
assert_eq!(at.read("xx02"), generate(30, 51));
|
||||||
|
at.remove("xx00");
|
||||||
|
at.remove("xx01");
|
||||||
|
at.remove("xx02");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue