summaryrefslogtreecommitdiff
path: root/tests/mv
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-04-17 23:34:45 +0200
committerJim Meyering <meyering@redhat.com>2008-04-21 00:01:51 +0200
commit512e111a926fedbd7dc7b0875ab837dbb7d2a7a6 (patch)
treef77cdb2c6bfc71f0560cf073324365c0a3e65526 /tests/mv
parentd25bf9dceb90dcb91f8af57aff433273c7145ff7 (diff)
downloadcoreutils-512e111a926fedbd7dc7b0875ab837dbb7d2a7a6.tar.xz
Revamp test-related Makefiles.
One side-effect of this change is that "make check" now works even if you put "." early in your shell's search PATH (don't do that!). Remove all test-related Makefile.am files, except those generated by mk-script. Instead, tests/Makefile.am now lists not only the tests directly under tests/, but also those in tests/*/ that are not generated by mk-script, e.g., cp/abuse, cp/acl, mv/i-1, etc. A lot of these changes are like this: -. $srcdir/../lang-default +. $top_srcdir/tests/lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh * configure.ac (AC_CONFIG_FILES): Remove corresponding Makefiles. * tests/check.mk (vc_exe_in_TESTS): Relax syntax requirements. * tests/rwx-to-mode: Remove file. Rewritten as... * tests/test-lib.sh (rwx_to_mode_): ...this new function. * tests/Makefile.am (EXTRA_DIST): Remove rwx-to-mode. (SUBDIRS): Remove each dir with a removed Makefile.am. (EXTRA_DIST): Add $(TESTS). (TESTS): Add over 300 entries.
Diffstat (limited to 'tests/mv')
-rw-r--r--tests/mv/Makefile.am52
-rwxr-xr-xtests/mv/acl4
-rwxr-xr-xtests/mv/atomic2
-rwxr-xr-xtests/mv/atomic22
-rwxr-xr-xtests/mv/backup-dir6
-rwxr-xr-xtests/mv/backup-is-src4
-rwxr-xr-xtests/mv/childproof6
-rwxr-xr-xtests/mv/diag4
-rwxr-xr-xtests/mv/dir-file2
-rwxr-xr-xtests/mv/dir2dir6
-rwxr-xr-xtests/mv/dup-source6
-rwxr-xr-xtests/mv/force4
-rwxr-xr-xtests/mv/hard-24
-rwxr-xr-xtests/mv/hard-34
-rwxr-xr-xtests/mv/hard-44
-rwxr-xr-xtests/mv/hard-link-14
-rwxr-xr-xtests/mv/hard-verbose6
-rwxr-xr-xtests/mv/i-14
-rwxr-xr-xtests/mv/i-24
-rwxr-xr-xtests/mv/i-38
-rwxr-xr-xtests/mv/i-44
-rwxr-xr-xtests/mv/i-56
-rwxr-xr-xtests/mv/i-link-no6
-rwxr-xr-xtests/mv/into-self4
-rwxr-xr-xtests/mv/into-self-24
-rwxr-xr-xtests/mv/into-self-34
-rwxr-xr-xtests/mv/into-self-44
-rwxr-xr-xtests/mv/leak-fd6
-rwxr-xr-xtests/mv/mv-special-16
-rwxr-xr-xtests/mv/no-target-dir4
-rwxr-xr-xtests/mv/part-fail6
-rwxr-xr-xtests/mv/part-hardlink4
-rwxr-xr-xtests/mv/part-rename4
-rwxr-xr-xtests/mv/part-symlink6
-rwxr-xr-xtests/mv/partition-perm4
-rwxr-xr-xtests/mv/perm-16
-rwxr-xr-xtests/mv/reply-no6
-rwxr-xr-xtests/mv/sticky-to-xpart8
-rwxr-xr-xtests/mv/to-symlink2
-rwxr-xr-xtests/mv/trailing-slash4
-rwxr-xr-xtests/mv/update6
41 files changed, 94 insertions, 146 deletions
diff --git a/tests/mv/Makefile.am b/tests/mv/Makefile.am
deleted file mode 100644
index 92ec68e39..000000000
--- a/tests/mv/Makefile.am
+++ /dev/null
@@ -1,52 +0,0 @@
-# Make coreutils tests for "mv". -*-Makefile-*-
-
-# Copyright (C) 1998-2008 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-TESTS = \
- atomic2 \
- sticky-to-xpart \
- hard-verbose \
- backup-dir \
- dir2dir \
- no-target-dir \
- atomic \
- acl \
- reply-no \
- leak-fd \
- part-hardlink \
- hard-4 \
- hard-3 \
- hard-2 \
- perm-1 \
- i-link-no \
- part-fail \
- dup-source childproof update mv-special-1 \
- into-self \
- into-self-2 \
- into-self-3 \
- into-self-4 \
- i-1 \
- i-2 \
- i-3 \
- i-4 \
- i-5 \
- backup-is-src \
- hard-link-1 force partition-perm to-symlink dir-file diag \
- part-symlink part-rename trailing-slash
-
-EXTRA_DIST = $(TESTS) vfat
-
-include $(top_srcdir)/tests/check.mk
diff --git a/tests/mv/acl b/tests/mv/acl
index 4fc6350b1..095fef12d 100755
--- a/tests/mv/acl
+++ b/tests/mv/acl
@@ -24,8 +24,8 @@ if test "$VERBOSE" = yes; then
setfacl --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_acl_
# Skip this test if cp was built without ACL support:
diff --git a/tests/mv/atomic b/tests/mv/atomic
index 5eadb958f..e0e8adce1 100755
--- a/tests/mv/atomic
+++ b/tests/mv/atomic
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_strace_ unlink
# Before the fix, mv would unnecessarily unlink the destination symlink:
diff --git a/tests/mv/atomic2 b/tests/mv/atomic2
index fe205b46d..4d2b4fc08 100755
--- a/tests/mv/atomic2
+++ b/tests/mv/atomic2
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
require_strace_ unlink
# Before the fix, mv would unnecessarily unlink the destination symlink:
diff --git a/tests/mv/backup-dir b/tests/mv/backup-dir
index 2880cbd30..d23476e34 100755
--- a/tests/mv/backup-dir
+++ b/tests/mv/backup-dir
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure "mv --verbose --backup" works the same for dirs and non-dirs.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir A B || framework_failure
touch X Y || framework_failure
diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src
index 9315d15a0..f90ce43c6 100755
--- a/tests/mv/backup-is-src
+++ b/tests/mv/backup-is-src
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/childproof b/tests/mv/childproof
index cdce93253..6cece3f3c 100755
--- a/tests/mv/childproof
+++ b/tests/mv/childproof
@@ -3,7 +3,7 @@
# With fileutils-4.1 and earlier, this test would fail for cp and mv.
# With coreutils-6.9 and earlier, this test would fail for ln.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,8 +25,8 @@ if test "$VERBOSE" = yes; then
ln --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir a b c || framework_failure
diff --git a/tests/mv/diag b/tests/mv/diag
index 3393606c3..37739f071 100755
--- a/tests/mv/diag
+++ b/tests/mv/diag
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
fi
# Make sure we get English translations.
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch f1 || framework_failure
touch f2 || framework_failure
diff --git a/tests/mv/dir-file b/tests/mv/dir-file
index 069524964..589944191 100755
--- a/tests/mv/dir-file
+++ b/tests/mv/dir-file
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p dir/file || framework_failure
> file || framework_failure
diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir
index 41b4c6363..f8361fbff 100755
--- a/tests/mv/dir2dir
+++ b/tests/mv/dir2dir
@@ -2,7 +2,7 @@
# Ensure that mv prints the right diagnostic for a dir->dir move
# where the destination directory is not empty.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir -p a/t b/t || framework_failure
touch a/t/f || framework_failure
diff --git a/tests/mv/dup-source b/tests/mv/dup-source
index a3eff6bdc..bba2ef869 100755
--- a/tests/mv/dup-source
+++ b/tests/mv/dup-source
@@ -4,7 +4,7 @@
# made this fail: cp a a d/
# Ensure that mv fails with a similar command.
-# Copyright (C) 2001, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,8 +25,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
fail=0
diff --git a/tests/mv/force b/tests/mv/force
index ad64c2290..27c0a18b4 100755
--- a/tests/mv/force
+++ b/tests/mv/force
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
ff=mvforce
ff2=mvforce2
diff --git a/tests/mv/hard-2 b/tests/mv/hard-2
index 7833e43f7..7813f8a95 100755
--- a/tests/mv/hard-2
+++ b/tests/mv/hard-2
@@ -2,7 +2,7 @@
# Ensure that moving hard-linked arguments onto existing destinations works.
# Likewise when using cp --preserve=link.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir dst || framework_failure
diff --git a/tests/mv/hard-3 b/tests/mv/hard-3
index 8d532a7c9..359a74dba 100755
--- a/tests/mv/hard-3
+++ b/tests/mv/hard-3
@@ -2,7 +2,7 @@
# Ensure that using `cp --preserve=link' to copy hard-linked arguments
# onto existing destinations works, even when one of the link operations fails.
-# Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p x dst/x || framework_failure
diff --git a/tests/mv/hard-4 b/tests/mv/hard-4
index 924c002dd..b082c1b21 100755
--- a/tests/mv/hard-4
+++ b/tests/mv/hard-4
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that mv removes a in this case: touch a; ln a b; mv a b
-# Copyright (C) 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch a || framework_failure
ln a b || framework_failure
diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1
index b82f2526d..93f8ec194 100755
--- a/tests/mv/hard-link-1
+++ b/tests/mv/hard-link-1
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/hard-verbose b/tests/mv/hard-verbose
index 13ca23f16..f156f79f7 100755
--- a/tests/mv/hard-verbose
+++ b/tests/mv/hard-verbose
@@ -1,7 +1,7 @@
#!/bin/sh
# ensure that mv's --verbose options works even in this unusual case
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch x || framework_failure
ln x y || framework_failure
diff --git a/tests/mv/i-1 b/tests/mv/i-1
index 326d72e1a..24726fedb 100755
--- a/tests/mv/i-1
+++ b/tests/mv/i-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure a `n' reply to `mv -i...' aborts the move operation.
-# Copyright (C) 2001, 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
: ${srcdir=.}
-. $srcdir/../require-perl
+. $top_srcdir/tests/require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - <<\EOF
diff --git a/tests/mv/i-2 b/tests/mv/i-2
index eb0181e1a..2b537309c 100755
--- a/tests/mv/i-2
+++ b/tests/mv/i-2
@@ -25,9 +25,9 @@ fi
# Make sure we get English translations.
-. $srcdir/../lang-default
+. $top_srcdir/tests/lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
for i in a b c d e f g h; do
diff --git a/tests/mv/i-3 b/tests/mv/i-3
index efac633ef..1250baf7d 100755
--- a/tests/mv/i-3
+++ b/tests/mv/i-3
@@ -2,7 +2,7 @@
# Make sure that `mv file unwritable-file' prompts the user
# and that `mv -f file unwritable-file' doesn't.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,9 +22,9 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../input-tty
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/input-tty
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
touch f g h i || framework_failure
diff --git a/tests/mv/i-4 b/tests/mv/i-4
index db61aab86..371452759 100755
--- a/tests/mv/i-4
+++ b/tests/mv/i-4
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
for i in a b; do
echo $i > $i || framework_failure
diff --git a/tests/mv/i-5 b/tests/mv/i-5
index e62d08cfa..4143c838e 100755
--- a/tests/mv/i-5
+++ b/tests/mv/i-5
@@ -1,7 +1,7 @@
#!/bin/sh
# Make sure `mv -i dir file' prompts before failing.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a || framework_failure
touch b || framework_failure
diff --git a/tests/mv/i-link-no b/tests/mv/i-link-no
index bb6fa44e2..b3f8fd4be 100755
--- a/tests/mv/i-link-no
+++ b/tests/mv/i-link-no
@@ -1,7 +1,7 @@
#!/bin/sh
# Show that mv doesn't preserve links to files the user has declined to move.
-# Copyright (C) 2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
mkdir a b || framework_failure
echo foo > a/foo || framework_failure
diff --git a/tests/mv/into-self b/tests/mv/into-self
index cbe7df9c5..a877de4f5 100755
--- a/tests/mv/into-self
+++ b/tests/mv/into-self
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
dir=toself-dir
file=toself-file
diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2
index ad00cb787..147941a22 100755
--- a/tests/mv/into-self-2
+++ b/tests/mv/into-self-2
@@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3
index ce858a234..f531f5188 100755
--- a/tests/mv/into-self-3
+++ b/tests/mv/into-self-3
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
dir1=is3-dir1
dir2=is3-dir2
diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4
index c43418a1d..39e053d61 100755
--- a/tests/mv/into-self-4
+++ b/tests/mv/into-self-4
@@ -2,7 +2,7 @@
# confirm that `mv symlink symlink' doesn't remove symlink
# Based on an example from David Luyer.
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
touch file || framework_failure
ln -s file s || framework_failure
diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd
index 7a0a0ba5d..549d25643 100755
--- a/tests/mv/leak-fd
+++ b/tests/mv/leak-fd
@@ -2,7 +2,7 @@
# Exercise mv's file-descriptor-leak bug, reported against coreutils-5.2.1
# and fixed (properly) on 2004-10-21.
-# Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,9 +25,9 @@ fi
# This test is relatively expensive, and might well evoke a
# framework-failure on systems with a smaller command-line length
-. $srcdir/../expensive
+. $top_srcdir/tests/expensive
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1
index 4d70e592b..8bf507577 100755
--- a/tests/mv/mv-special-1
+++ b/tests/mv/mv-special-1
@@ -1,7 +1,7 @@
#! /bin/sh
# Test "mv" with special files.
-# Copyright (C) 1998, 1999, 2000, 2002, 2004-2007 Free Software
+# Copyright (C) 1998, 1999, 2000, 2002, 2004-2008 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir
index 6fbdc8b9b..ba9a6b0a9 100755
--- a/tests/mv/no-target-dir
+++ b/tests/mv/no-target-dir
@@ -2,7 +2,7 @@
# ensure that --no-target-directory (-T) works when the destination is
# an empty directory.
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir -p d/sub empty src d2/sub e2 || framework_failure
touch f || framework_failure
diff --git a/tests/mv/part-fail b/tests/mv/part-fail
index 4f12c1415..92d7ad4af 100755
--- a/tests/mv/part-fail
+++ b/tests/mv/part-fail
@@ -4,7 +4,7 @@
# This is a bit fragile since it relies on the string used
# for EPERM: `permission denied'.
-# Copyright (C) 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,8 +24,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink
index 859cab09e..fed5bcf34 100755
--- a/tests/mv/part-hardlink
+++ b/tests/mv/part-hardlink
@@ -4,7 +4,7 @@
# For additional constraints, see the comment in copy.c.
# Before coreutils-5.2.1, this test would fail.
-# Copyright (C) 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/part-rename b/tests/mv/part-rename
index 2c6035950..30913ec10 100755
--- a/tests/mv/part-rename
+++ b/tests/mv/part-rename
@@ -3,7 +3,7 @@
# another, and giving it a different name at the destination would cause mv
# to get a failed assertion.
-# Copyright (C) 2000, 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index 383179bfc..f49ebec02 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -2,7 +2,7 @@
# make sure cp and mv can handle many combinations of local and
# other-partition regular/symlink'd files.
-# Copyright (C) 2000, 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,8 +23,8 @@ if test "$VERBOSE" = yes; then
cp --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm
index 8df9571d9..54aa8363a 100755
--- a/tests/mv/partition-perm
+++ b/tests/mv/partition-perm
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/perm-1 b/tests/mv/perm-1
index 08a4eaa5b..a5ab790c0 100755
--- a/tests/mv/perm-1
+++ b/tests/mv/perm-1
@@ -2,7 +2,7 @@
# ensure that mv gives one diagnostic, not two, when failing
# due to lack of permissions
-# Copyright (C) 2002, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
skip_if_root_
mkdir -p no-write/dir || framework_failure
diff --git a/tests/mv/reply-no b/tests/mv/reply-no
index baa2f3e5d..35ec5241c 100755
--- a/tests/mv/reply-no
+++ b/tests/mv/reply-no
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure that `mv --reply=no f1 f2' works.
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
touch a b || framework_failure
diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart
index ac2e16193..1578ae849 100755
--- a/tests/mv/sticky-to-xpart
+++ b/tests/mv/sticky-to-xpart
@@ -4,7 +4,7 @@
# mv: cannot remove `x': Operation not permitted
# Affects coreutils-6.0-6.9.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,9 +24,9 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../envvar-check
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/envvar-check
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
require_root_
cleanup_() { rm -rf "$other_partition_tmpdir"; }
diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink
index 80e1d138f..b265a3e31 100755
--- a/tests/mv/to-symlink
+++ b/tests/mv/to-symlink
@@ -22,7 +22,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_top_srcdir/tests/other-fs-tmpdir"
diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash
index e20d180d6..0a2a361b0 100755
--- a/tests/mv/trailing-slash
+++ b/tests/mv/trailing-slash
@@ -4,7 +4,7 @@
# Also, ensure that "mv dir non-exist-dir/" works.
# Also, ensure that "cp dir non-exist-dir/" works.
-# Copyright (C) 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/test-lib.sh
mkdir foo || framework_failure
diff --git a/tests/mv/update b/tests/mv/update
index 15c922c06..6fab2ce03 100755
--- a/tests/mv/update
+++ b/tests/mv/update
@@ -1,7 +1,7 @@
#!/bin/sh
# make sure --update works as advertised
-# Copyright (C) 2001, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,8 +22,8 @@ if test "$VERBOSE" = yes; then
mv --version
fi
-. $srcdir/../lang-default
-. $srcdir/../test-lib.sh
+. $top_srcdir/tests/lang-default
+. $top_srcdir/tests/test-lib.sh
echo old > old || framework_failure
touch -d yesterday old || framework_failure