mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
parent
346902e30b
commit
cc4b28780b
2 changed files with 25 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
|||
// spell-checker:ignore udev pcent iuse itotal iused ipcent
|
||||
use std::collections::HashSet;
|
||||
|
||||
use crate::common::util::*;
|
||||
|
||||
#[test]
|
||||
|
@ -204,6 +206,27 @@ fn test_exclude_type_option() {
|
|||
new_ucmd!().args(&["-x", "ext4", "-x", "ext3"]).succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_exclude_all_types() {
|
||||
let fs_types = new_ucmd!()
|
||||
.arg("--output=fstype")
|
||||
.succeeds()
|
||||
.stdout_move_str();
|
||||
let fs_types: HashSet<_> = fs_types.lines().skip(1).collect();
|
||||
|
||||
let mut args = Vec::new();
|
||||
|
||||
for fs_type in fs_types {
|
||||
args.push("-x");
|
||||
args.push(fs_type.trim_end());
|
||||
}
|
||||
|
||||
new_ucmd!()
|
||||
.args(&args)
|
||||
.fails()
|
||||
.stderr_contains("no file systems processed");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_include_exclude_same_type() {
|
||||
new_ucmd!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue