mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
ln: don't return an empty path in relative_path
This commit is contained in:
parent
439b7e0ca5
commit
3d3af5c8ca
2 changed files with 12 additions and 1 deletions
|
@ -580,3 +580,11 @@ fn test_relative_src_already_symlink() {
|
|||
ucmd.arg("-sr").arg("file2").arg("file3").succeeds();
|
||||
assert!(at.resolve_link("file3").ends_with("file1"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_relative_recursive() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
at.mkdir("dir");
|
||||
ucmd.args(&["-sr", "dir", "dir/recursive"]).succeeds();
|
||||
assert_eq!(at.resolve_link("dir/recursive"), ".");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue