mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +00:00
df
: Adds support for mount path prefix matching and input path (#3161)
* Adds support for mount path prefix matching and input path canonicalization - Sorts mount paths in reverse lexicographical order - Canonicalize all paths and clear invalid paths - Checking of mount path prefix matches input path
This commit is contained in:
parent
1795272473
commit
5c5f4ca6ad
2 changed files with 53 additions and 18 deletions
|
@ -54,6 +54,18 @@ fn test_order_same() {
|
|||
assert_eq!(output1, output2);
|
||||
}
|
||||
|
||||
/// Test of mount point begin repeated
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn test_output_mp_repeat() {
|
||||
let output1 = new_ucmd!().arg("/").arg("/").succeeds().stdout_move_str();
|
||||
let output1: Vec<String> = output1
|
||||
.lines()
|
||||
.map(|l| String::from(l.split_once(' ').unwrap().0))
|
||||
.collect();
|
||||
assert_eq!(3, output1.len());
|
||||
assert_eq!(output1[1], output1[2]);
|
||||
}
|
||||
#[test]
|
||||
fn test_output_conflict_options() {
|
||||
for option in ["-i", "-T", "-P"] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue