mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #3323 from jfinkels/df-multiple-output-occurrences
df: allow multiple occurrences of --output arg
This commit is contained in:
commit
b07b71e6be
2 changed files with 13 additions and 0 deletions
|
@ -389,6 +389,7 @@ pub fn uu_app<'a>() -> Command<'a> {
|
|||
.long("output")
|
||||
.takes_value(true)
|
||||
.use_value_delimiter(true)
|
||||
.multiple_occurrences(true)
|
||||
.possible_values(OUTPUT_FIELD_LIST)
|
||||
.default_missing_values(&OUTPUT_FIELD_LIST)
|
||||
.default_values(&["source", "size", "used", "avail", "pcent", "target"])
|
||||
|
|
|
@ -222,6 +222,18 @@ fn test_output_selects_columns() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_output_multiple_occurrences() {
|
||||
let output = new_ucmd!()
|
||||
.args(&["--output=source", "--output=target"])
|
||||
.succeeds()
|
||||
.stdout_move_str();
|
||||
assert_eq!(
|
||||
output.lines().next().unwrap(),
|
||||
"Filesystem Mounted on "
|
||||
);
|
||||
}
|
||||
|
||||
// TODO Fix the spacing.
|
||||
#[test]
|
||||
fn test_output_file_all_filesystems() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue