mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
ln: reject --relative without --symbolic
This commit is contained in:
parent
87570bbc10
commit
ed69d797b5
2 changed files with 7 additions and 15 deletions
|
@ -428,20 +428,6 @@ fn test_symlink_relative() {
|
|||
assert_eq!(at.resolve_link(link), file_a);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hardlink_relative() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
let file_a = "test_hardlink_relative_a";
|
||||
let link = "test_hardlink_relative_link";
|
||||
|
||||
at.touch(file_a);
|
||||
|
||||
// relative hardlink
|
||||
ucmd.args(&["-r", "-v", file_a, link])
|
||||
.succeeds()
|
||||
.stdout_only(format!("'{}' -> '{}'\n", link, file_a));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_symlink_relative_path() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
@ -571,3 +557,8 @@ fn test_symlink_no_deref_file() {
|
|||
assert!(at.is_symlink(link));
|
||||
assert_eq!(at.resolve_link(link), file1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_relative_requires_symbolic() {
|
||||
new_ucmd!().args(&["-r", "foo", "bar"]).fails();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue