tests/df: test follow symlinks

Signed-off-by: Alexander Bakanovskii <skotttt228@gmail.com>
This commit is contained in:
Alexander Bakanovskii
2025-09-28 23:06:31 +03:00
parent f66e65620d
commit d6985039c9
+16
View File
@@ -123,6 +123,22 @@ fn test_df_output() {
assert_eq!(actual, expected);
}
#[test]
fn test_df_follows_symlinks() {
let output = new_ucmd!()
.arg("-h")
.arg("--output=source")
.succeeds()
.stdout_str_lossy();
let filesystems = output.lines().skip(1).collect::<Vec<&str>>();
assert!(
filesystems
.iter()
.all(|&x| !std::path::Path::new(x).is_symlink())
);
}
#[test]
fn test_df_output_overridden() {
let expected = if cfg!(target_os = "macos") {