mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
ln: make the tests/ln/hard-backup.sh test work
We haven't a great error message with hard link on the same file + Update the GNU error message to match ours
This commit is contained in:
parent
de71d01959
commit
050b5b0c9b
3 changed files with 33 additions and 1 deletions
|
@ -615,3 +615,12 @@ fn test_relative_recursive() {
|
|||
ucmd.args(&["-sr", "dir", "dir/recursive"]).succeeds();
|
||||
assert_eq!(at.resolve_link("dir/recursive"), ".");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_backup_same_file() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
at.touch("file1");
|
||||
ucmd.args(&["--backup", "file1", "./file1"])
|
||||
.fails()
|
||||
.stderr_contains("'file1' and './file1' are the same file");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue