mirror of
https://github.com/sharkdp/fd.git
synced 2024-09-28 13:01:30 +02:00
Add expected behavior as unit tests
This commit is contained in:
parent
d6034119ae
commit
918dfc6ef0
@ -604,7 +604,24 @@ fn test_follow_broken_symlink() {
|
||||
te.create_broken_symlink("broken_symlink")
|
||||
.expect("Failed to create broken symlink.");
|
||||
|
||||
te.assert_output(&["--follow", "--type", "f", "symlink"], "broken_symlink");
|
||||
te.assert_output(
|
||||
&["symlink"],
|
||||
"broken_symlink
|
||||
symlink",
|
||||
);
|
||||
te.assert_output(
|
||||
&["--type", "symlink", "symlink"],
|
||||
"broken_symlink
|
||||
symlink",
|
||||
);
|
||||
|
||||
te.assert_output(&["--type", "file", "symlink"], "");
|
||||
|
||||
te.assert_output(
|
||||
&["--follow", "--type", "symlink", "symlink"],
|
||||
"broken_symlink",
|
||||
);
|
||||
te.assert_output(&["--follow", "--type", "file", "symlink"], "");
|
||||
}
|
||||
|
||||
/// Null separator (--print0)
|
||||
|
Loading…
Reference in New Issue
Block a user