1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

df: add output option's valid field names

This commit is contained in:
xxyzz 2022-02-17 13:43:59 +08:00
parent c849b8722f
commit c16c06ea0d
No known key found for this signature in database
GPG key ID: F796163E6DCFEE9D
2 changed files with 28 additions and 3 deletions

View file

@ -58,4 +58,23 @@ fn test_order_same() {
assert_eq!(output1, output2);
}
#[test]
fn test_output_conflict_options() {
for option in ["-i", "-T", "-P"] {
new_ucmd!().arg("--output=source").arg(option).fails();
}
}
#[test]
fn test_output_option() {
new_ucmd!().arg("--output").succeeds();
new_ucmd!().arg("--output=source,target").succeeds();
new_ucmd!().arg("--output=invalid_option").fails();
}
#[test]
fn test_type_option() {
new_ucmd!().args(&["-t", "ext4", "-t", "ext3"]).succeeds();
}
// ToDO: more tests...