diff options
author | Jim Meyering <meyering@redhat.com> | 2010-11-14 12:07:57 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-11-17 20:48:57 +0100 |
commit | fbcc100f5bc4e5d57370544093fc9edfbde411d3 (patch) | |
tree | fc7976e4eecd908c3f75e0084376a17185b9b43d /tests | |
parent | ff7f0ff85c40174f1885ec61fa4ab6b73d02b555 (diff) | |
download | coreutils-fbcc100f5bc4e5d57370544093fc9edfbde411d3.tar.xz |
tests: convert remaining uses of test-lib.sh to init.sh
RHS='. "\${srcdir=.}/init.sh"; path_prepend_ ../src'
git grep -l test-lib.sh \
| xargs perl -pi -e 's,^\. \$srcdir/test-lib\.sh$,'"$RHS",
Diffstat (limited to 'tests')
37 files changed, 37 insertions, 37 deletions
diff --git a/tests/chmod/silent b/tests/chmod/silent index 2cfbcbbd7..20c232b94 100755 --- a/tests/chmod/silent +++ b/tests/chmod/silent @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { chgrp --version; chmod --version; chown --version; } chmod -f 0 no-such 2> out && fail=1 diff --git a/tests/cp/acl b/tests/cp/acl index 3e93645ab..a3b909ae4 100755 --- a/tests/cp/acl +++ b/tests/cp/acl @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { mv --version; getfacl --version; setfacl --version; } require_acl_ diff --git a/tests/cp/cp-mv-backup b/tests/cp/cp-mv-backup index c978ba253..ad7bfa511 100755 --- a/tests/cp/cp-mv-backup +++ b/tests/cp/cp-mv-backup @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && cp --version umask 022 diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr index bd0ef0ed8..bcee4214f 100755 --- a/tests/cp/cp-mv-enotsup-xattr +++ b/tests/cp/cp-mv-enotsup-xattr @@ -18,7 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { cp --version; mv --version; } require_root_ diff --git a/tests/cp/perm b/tests/cp/perm index 346b24536..cb4709f50 100755 --- a/tests/cp/perm +++ b/tests/cp/perm @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { cp --version; mv --version; } very_expensive_ diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid index a5190e4e7..6fa5293c7 100755 --- a/tests/cp/preserve-gid +++ b/tests/cp/preserve-gid @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && cp --version require_root_ diff --git a/tests/ln/sf-1 b/tests/ln/sf-1 index fdfc3f711..189abe5b8 100755 --- a/tests/ln/sf-1 +++ b/tests/ln/sf-1 @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && ln --version echo foo > a || framework_failure diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid index bf2dfcd52..6b4f368d2 100755 --- a/tests/ls/nameless-uid +++ b/tests/ls/nameless-uid @@ -19,7 +19,7 @@ : ${srcdir=.} . $srcdir/require-perl -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && ls --version require_root_ diff --git a/tests/ls/rt-1 b/tests/ls/rt-1 index 51d023642..909deb161 100755 --- a/tests/ls/rt-1 +++ b/tests/ls/rt-1 @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { ls --version; touch --version; } date=1998-01-15 diff --git a/tests/misc/arch b/tests/misc/arch index a4475e6d0..462919f57 100755 --- a/tests/misc/arch +++ b/tests/misc/arch @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && arch --version require_built_ arch diff --git a/tests/misc/env-null b/tests/misc/env-null index ed2e21d58..c08856c01 100755 --- a/tests/misc/env-null +++ b/tests/misc/env-null @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { env --version; env -- printenv --version; } # POSIX is clear that environ may, but need not be, sorted. diff --git a/tests/misc/md5sum-parallel b/tests/misc/md5sum-parallel index 6f38b8b1b..fdbc4c202 100755 --- a/tests/misc/md5sum-parallel +++ b/tests/misc/md5sum-parallel @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && md5sum --version (mkdir tmp && cd tmp && seq 500 | xargs touch) diff --git a/tests/misc/printenv b/tests/misc/printenv index dd82c0509..67173ed58 100755 --- a/tests/misc/printenv +++ b/tests/misc/printenv @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && env -- printenv --version # Without arguments, printenv behaves like env. Some shells provide diff --git a/tests/misc/printf b/tests/misc/printf index cf376f3ba..b0fe19cdb 100755 --- a/tests/misc/printf +++ b/tests/misc/printf @@ -18,7 +18,7 @@ prog="$abs_top_builddir/src/printf" -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && env -- printf --version getlimits_ diff --git a/tests/misc/printf-hex b/tests/misc/printf-hex index 39b70d6ef..864dc0bb2 100755 --- a/tests/misc/printf-hex +++ b/tests/misc/printf-hex @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && env -- printf --version env printf '\x7e3\n' > out || fail=1 diff --git a/tests/misc/printf-surprise b/tests/misc/printf-surprise index 702ab67a3..53f46b58f 100755 --- a/tests/misc/printf-surprise +++ b/tests/misc/printf-surprise @@ -18,7 +18,7 @@ prog=printf -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && env -- printf --version require_ulimit_ diff --git a/tests/misc/pwd-long b/tests/misc/pwd-long index c58207abe..b3d14c6ca 100755 --- a/tests/misc/pwd-long +++ b/tests/misc/pwd-long @@ -20,7 +20,7 @@ : ${srcdir=.} . $srcdir/require-perl -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && env -- pwd --version require_readable_root_ diff --git a/tests/misc/pwd-option b/tests/misc/pwd-option index e4ecf11f9..e01026674 100755 --- a/tests/misc/pwd-option +++ b/tests/misc/pwd-option @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && env -- pwd --version mkdir -p a/b || framework_failure diff --git a/tests/misc/pwd-unreadable-parent b/tests/misc/pwd-unreadable-parent index 1f3d914eb..b24a97c89 100755 --- a/tests/misc/pwd-unreadable-parent +++ b/tests/misc/pwd-unreadable-parent @@ -18,7 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { env -- pwd --version; readlink --version; } test $host_os != linux-gnu && diff --git a/tests/misc/selinux b/tests/misc/selinux index 0a8259fef..0d798c1d2 100755 --- a/tests/misc/selinux +++ b/tests/misc/selinux @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && for i in chcon cp ls mv stat; do $i --version; done require_root_ diff --git a/tests/misc/stdbuf b/tests/misc/stdbuf index 8302c4896..4a694c7cd 100755 --- a/tests/misc/stdbuf +++ b/tests/misc/stdbuf @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { stdbuf --version; mv --version; } getlimits_ diff --git a/tests/misc/stty b/tests/misc/stty index 0659d51a5..cc1d933a3 100755 --- a/tests/misc/stty +++ b/tests/misc/stty @@ -17,7 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Make sure there's a tty on stdin. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && stty --version require_controlling_input_terminal_ diff --git a/tests/misc/stty-row-col b/tests/misc/stty-row-col index 5acb3d0bb..ed7fede97 100755 --- a/tests/misc/stty-row-col +++ b/tests/misc/stty-row-col @@ -28,7 +28,7 @@ export COLUMNS LC_ALL=C export LC_ALL -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && stty --version require_controlling_input_terminal_ diff --git a/tests/misc/su-fail b/tests/misc/su-fail index 4c57c945b..e8a0c5ff5 100755 --- a/tests/misc/su-fail +++ b/tests/misc/su-fail @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && su --version require_built_ su diff --git a/tests/misc/sum-sysv b/tests/misc/sum-sysv index 705de2766..5465f213a 100755 --- a/tests/misc/sum-sysv +++ b/tests/misc/sum-sysv @@ -25,7 +25,7 @@ LC_ALL=C export LC_ALL -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && sum --version # FYI, 16843009 is floor (2^32 / 255). diff --git a/tests/misc/truncate-owned-by-other b/tests/misc/truncate-owned-by-other index 86fd5288e..88aa63cbe 100755 --- a/tests/misc/truncate-owned-by-other +++ b/tests/misc/truncate-owned-by-other @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && truncate --version require_root_ diff --git a/tests/misc/wc-parallel b/tests/misc/wc-parallel index 47f10441c..fd809f5f2 100755 --- a/tests/misc/wc-parallel +++ b/tests/misc/wc-parallel @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && md5sum --version (mkdir tmp && cd tmp && seq 2000 | xargs touch) diff --git a/tests/misc/xattr b/tests/misc/xattr index 3a27f15e0..13e0857a5 100755 --- a/tests/misc/xattr +++ b/tests/misc/xattr @@ -18,7 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { cp --version; mv --version; ginstall --version; } # Skip this test if cp was built without xattr support: diff --git a/tests/mkdir/selinux b/tests/mkdir/selinux index b0240eb0a..f055cb8ac 100755 --- a/tests/mkdir/selinux +++ b/tests/mkdir/selinux @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { mkdir --version; mkfifo --version; mknod --version; } # Note: on an SELinux/enforcing system running mcstransd older than diff --git a/tests/mv/acl b/tests/mv/acl index c67630ed0..75f500786 100755 --- a/tests/mv/acl +++ b/tests/mv/acl @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { mv --version; getfacl --version; setfacl --version; } require_acl_ diff --git a/tests/mv/childproof b/tests/mv/childproof index 2e5e4611c..ed6c1802e 100755 --- a/tests/mv/childproof +++ b/tests/mv/childproof @@ -18,7 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { cp --version; mv --version; ln --version; } skip_if_root_ diff --git a/tests/mv/diag b/tests/mv/diag index f40fc7c42..d32513d9b 100755 --- a/tests/mv/diag +++ b/tests/mv/diag @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && mv --version touch f1 || framework_failure diff --git a/tests/mv/dup-source b/tests/mv/dup-source index 9ede87ef6..34ef63332 100755 --- a/tests/mv/dup-source +++ b/tests/mv/dup-source @@ -19,7 +19,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { cp --version; mv --version; } skip_if_root_ diff --git a/tests/mv/hard-2 b/tests/mv/hard-2 index 704e2679d..eb83b117f 100755 --- a/tests/mv/hard-2 +++ b/tests/mv/hard-2 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { cp --version; mv --version; } skip_if_root_ diff --git a/tests/mv/i-2 b/tests/mv/i-2 index 83596426e..7e49bcadd 100755 --- a/tests/mv/i-2 +++ b/tests/mv/i-2 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { cp --version; mv --version; } skip_if_root_ diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink index bf2fd451a..3f67d6cdd 100755 --- a/tests/mv/part-symlink +++ b/tests/mv/part-symlink @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { cp --version; mv --version; } cleanup_() { rm -rf "$other_partition_tmpdir"; } diff --git a/tests/mv/update b/tests/mv/update index b0a532c63..5bee53cb2 100755 --- a/tests/mv/update +++ b/tests/mv/update @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src test "$VERBOSE" = yes && { cp --version; mv --version; } echo old > old || framework_failure |