diff options
author | Jim Meyering <meyering@redhat.com> | 2010-11-14 12:02:39 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-11-17 20:48:57 +0100 |
commit | ff7f0ff85c40174f1885ec61fa4ab6b73d02b555 (patch) | |
tree | f3b51b82bcee4d908f31adab1c09552e77e54fe2 /tests/cp | |
parent | f38becab02472e6872048a1951b249b2a3c054df (diff) | |
download | coreutils-ff7f0ff85c40174f1885ec61fa4ab6b73d02b555.tar.xz |
tests: convert 'if test "$VERBOSE" = yes; then' to test ... &&
Diffstat (limited to 'tests/cp')
-rwxr-xr-x | tests/cp/acl | 11 | ||||
-rwxr-xr-x | tests/cp/cp-mv-backup | 8 | ||||
-rwxr-xr-x | tests/cp/cp-mv-enotsup-xattr | 8 | ||||
-rwxr-xr-x | tests/cp/perm | 8 | ||||
-rwxr-xr-x | tests/cp/preserve-gid | 7 |
5 files changed, 9 insertions, 33 deletions
diff --git a/tests/cp/acl b/tests/cp/acl index c19eb4e93..3e93645ab 100755 --- a/tests/cp/acl +++ b/tests/cp/acl @@ -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/>. -# Make sure we get English translations. - -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/cp/cp-mv-backup b/tests/cp/cp-mv-backup index 515c0c54c..c978ba253 100755 --- a/tests/cp/cp-mv-backup +++ b/tests/cp/cp-mv-backup @@ -16,14 +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 -fi - -# Ensure that ls sorts the same way for everyone. - . $srcdir/test-lib.sh +test "$VERBOSE" = yes && cp --version umask 022 diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr index 7e7b6456f..bd0ef0ed8 100755 --- a/tests/cp/cp-mv-enotsup-xattr +++ b/tests/cp/cp-mv-enotsup-xattr @@ -18,13 +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 -fi - . $srcdir/test-lib.sh +test "$VERBOSE" = yes && { cp --version; mv --version; } + require_root_ cwd=`pwd` diff --git a/tests/cp/perm b/tests/cp/perm index f68e529f7..346b24536 100755 --- a/tests/cp/perm +++ b/tests/cp/perm @@ -16,13 +16,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 -fi - . $srcdir/test-lib.sh +test "$VERBOSE" = yes && { cp --version; mv --version; } + very_expensive_ umask 037 diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid index f9a9d2a7e..a5190e4e7 100755 --- a/tests/cp/preserve-gid +++ b/tests/cp/preserve-gid @@ -17,6 +17,8 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . $srcdir/test-lib.sh +test "$VERBOSE" = yes && cp --version + require_root_ # Some of the tests expect a umask that grants group and/or world read access. @@ -58,11 +60,6 @@ t1() { "$nameless_uid" "$@" } -if test "x$VERBOSE" = xyes; then - set -x - cp --version -fi - nameless_uid=`$PERL -le 'foreach my $i (1000..16*1024-1) { getpwuid $i or (print $i), exit }'` nameless_gid1=`$PERL -le 'foreach my $i (1000..16*1024) { getgrgid $i or (print $i), exit }'` nameless_gid2=`$PERL -le 'foreach my $i ('"$nameless_gid1"'+1..16*1024) { getgrgid $i or (print $i), exit }'` |