mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
tests/df: test follow symlinks
Signed-off-by: Alexander Bakanovskii <skotttt228@gmail.com>
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user