2 # Ensure that hard links are preserved when moving between partitions
3 # and when the links are in separate command line arguments.
4 # For additional constraints, see the comment in copy.c.
5 # Before coreutils-5.2.1, this test would fail.
7 # Copyright (C) 2004-2010 Free Software Foundation, Inc.
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 if test "$VERBOSE" = yes; then
28 cleanup_
() { rm -rf "$other_partition_tmpdir"; }
29 .
"$abs_srcdir/other-fs-tmpdir"
31 touch f || framework_failure
32 ln f g || framework_failure
33 mkdir a b || framework_failure
34 touch a
/1 || framework_failure
35 ln a
/1 b
/1 || framework_failure
38 mv f g
"$other_partition_tmpdir" || fail
=1
39 mv a b
"$other_partition_tmpdir" || fail
=1
41 cd "$other_partition_tmpdir"
43 test $1 = $3 || fail
=1
45 test $1 = $3 || fail
=1