summaryrefslogtreecommitdiff
path: root/tests/mv
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-11-14 12:02:39 +0100
committerJim Meyering <meyering@redhat.com>2010-11-17 20:48:57 +0100
commitff7f0ff85c40174f1885ec61fa4ab6b73d02b555 (patch)
treef3b51b82bcee4d908f31adab1c09552e77e54fe2 /tests/mv
parentf38becab02472e6872048a1951b249b2a3c054df (diff)
downloadcoreutils-ff7f0ff85c40174f1885ec61fa4ab6b73d02b555.tar.xz
tests: convert 'if test "$VERBOSE" = yes; then' to test ... &&
Diffstat (limited to 'tests/mv')
-rwxr-xr-xtests/mv/acl9
-rwxr-xr-xtests/mv/childproof9
-rwxr-xr-xtests/mv/diag7
-rwxr-xr-xtests/mv/dup-source9
-rwxr-xr-xtests/mv/hard-28
-rwxr-xr-xtests/mv/i-211
-rwxr-xr-xtests/mv/part-symlink8
-rwxr-xr-xtests/mv/update7
8 files changed, 14 insertions, 54 deletions
diff --git a/tests/mv/acl b/tests/mv/acl
index 16d7692f5..c67630ed0 100755
--- a/tests/mv/acl
+++ b/tests/mv/acl
@@ -17,14 +17,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
- getfacl --version
- setfacl --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { mv --version; getfacl --version; setfacl --version; }
+
require_acl_
# Skip this test if cp was built without ACL support:
diff --git a/tests/mv/childproof b/tests/mv/childproof
index 057ce91d4..2e5e4611c 100755
--- a/tests/mv/childproof
+++ b/tests/mv/childproof
@@ -18,14 +18,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
- mv --version
- ln --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; ln --version; }
+
skip_if_root_
mkdir a b c || framework_failure
diff --git a/tests/mv/diag b/tests/mv/diag
index 1a23b5333..f40fc7c42 100755
--- a/tests/mv/diag
+++ b/tests/mv/diag
@@ -16,13 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-# Make sure we get English translations.
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && mv --version
touch f1 || framework_failure
touch f2 || framework_failure
diff --git a/tests/mv/dup-source b/tests/mv/dup-source
index ad947b4b5..9ede87ef6 100755
--- a/tests/mv/dup-source
+++ b/tests/mv/dup-source
@@ -19,15 +19,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
- mv --version
-fi
-
. $srcdir/test-lib.sh
-skip_if_root_
+test "$VERBOSE" = yes && { cp --version; mv --version; }
+skip_if_root_
for i in cp; do
diff --git a/tests/mv/hard-2 b/tests/mv/hard-2
index 1ae0a34ef..704e2679d 100755
--- a/tests/mv/hard-2
+++ b/tests/mv/hard-2
@@ -17,13 +17,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
- cp --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; }
+
skip_if_root_
mkdir dst || framework_failure
diff --git a/tests/mv/i-2 b/tests/mv/i-2
index aed1c9eee..83596426e 100755
--- a/tests/mv/i-2
+++ b/tests/mv/i-2
@@ -17,16 +17,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
- cp --version
-fi
-
-
-# Make sure we get English translations.
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; }
+
skip_if_root_
for i in a b c d e f g h; do
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index 3b8e442ef..bf2fd451a 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -17,13 +17,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
- cp --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; }
+
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
diff --git a/tests/mv/update b/tests/mv/update
index a8035922e..b0a532c63 100755
--- a/tests/mv/update
+++ b/tests/mv/update
@@ -16,13 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
- mv --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; }
echo old > old || framework_failure
touch -d yesterday old || framework_failure