mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
df: fix panic when using -x argument (#3257)
Also allow multiple '-x' options
This commit is contained in:
@@ -442,8 +442,10 @@ pub fn uu_app<'a>() -> App<'a> {
|
||||
Arg::new(OPT_EXCLUDE_TYPE)
|
||||
.short('x')
|
||||
.long("exclude-type")
|
||||
.allow_invalid_utf8(true)
|
||||
.takes_value(true)
|
||||
.use_delimiter(true)
|
||||
.multiple_occurrences(true)
|
||||
.help("limit listing to file systems not of type TYPE"),
|
||||
)
|
||||
.arg(Arg::new(OPT_PATHS).multiple_occurrences(true))
|
||||
|
||||
@@ -85,6 +85,11 @@ fn test_type_option() {
|
||||
new_ucmd!().args(&["-t", "ext4", "-t", "ext3"]).succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_exclude_type_option() {
|
||||
new_ucmd!().args(&["-x", "ext4", "-x", "ext3"]).succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_total() {
|
||||
// Example output:
|
||||
|
||||
Reference in New Issue
Block a user