summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-07-27 13:22:39 +0100
committerPádraig Brady <P@draigBrady.com>2011-07-27 13:32:32 +0100
commit42300faaa90e69caf6c728a1ed0cf1abe67f6e3b (patch)
treecd08a50181c1e0de3c89cfc9564dbb3501cc54d3 /tests
parent2aea1828a1aab158f68cccf3eac408203889021e (diff)
downloadcoreutils-42300faaa90e69caf6c728a1ed0cf1abe67f6e3b.tar.xz
maint: copy: refactor hard link creation
* src/copy.c (create_hard_link): A new function refactored from existing code. (copy_internal): Call the new function from all 3 locations that create hard links. * tests/cp/same-file: Amend to match the adjusted diagnostic.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cp/same-file4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/cp/same-file b/tests/cp/same-file
index da4fce3d0..0edd68ea7 100755
--- a/tests/cp/same-file
+++ b/tests/cp/same-file
@@ -137,7 +137,7 @@ cat <<\EOF | sed "$remove_these_sed" > expected
0 -bd (foo symlink symlink.~1~ -> foo)
0 -bf (foo symlink symlink.~1~ -> foo)
0 -bdf (foo symlink symlink.~1~ -> foo)
-1 -l [cp: cannot create link `symlink'] (foo symlink -> foo)
+1 -l [cp: cannot create hard link `symlink' to `foo'] (foo symlink -> foo)
0 -dl (foo symlink -> foo)
0 -fl (foo symlink)
0 -dfl (foo symlink)
@@ -188,7 +188,7 @@ cat <<\EOF | sed "$remove_these_sed" > expected
0 -bd (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo)
0 -bf (foo sl1 -> foo sl2 sl2.~1~ -> foo)
0 -bdf (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo)
-1 -l [cp: cannot create link `sl2'] (foo sl1 -> foo sl2 -> foo)
+1 -l [cp: cannot create hard link `sl2' to `sl1'] (foo sl1 -> foo sl2 -> foo)
0 -fl (foo sl1 -> foo sl2 -> foo)
0 -bl (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo)
0 -bfl (foo sl1 -> foo sl2 -> foo sl2.~1~ -> foo)