diff --git a/tests/by-util/test_df.rs b/tests/by-util/test_df.rs index ecb60bc5f..ec37f78b4 100644 --- a/tests/by-util/test_df.rs +++ b/tests/by-util/test_df.rs @@ -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::>(); + 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") {