]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: convert remaining uses of test-lib.sh to init.sh
authorJim Meyering <meyering@redhat.com>
Sun, 14 Nov 2010 11:07:57 +0000 (12:07 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 17 Nov 2010 19:48:57 +0000 (20:48 +0100)
RHS='. "\${srcdir=.}/init.sh"; path_prepend_ ../src'
git grep -l test-lib.sh \
  | xargs perl -pi -e 's,^\. \$srcdir/test-lib\.sh$,'"$RHS",

37 files changed:
tests/chmod/silent
tests/cp/acl
tests/cp/cp-mv-backup
tests/cp/cp-mv-enotsup-xattr
tests/cp/perm
tests/cp/preserve-gid
tests/ln/sf-1
tests/ls/nameless-uid
tests/ls/rt-1
tests/misc/arch
tests/misc/env-null
tests/misc/md5sum-parallel
tests/misc/printenv
tests/misc/printf
tests/misc/printf-hex
tests/misc/printf-surprise
tests/misc/pwd-long
tests/misc/pwd-option
tests/misc/pwd-unreadable-parent
tests/misc/selinux
tests/misc/stdbuf
tests/misc/stty
tests/misc/stty-row-col
tests/misc/su-fail
tests/misc/sum-sysv
tests/misc/truncate-owned-by-other
tests/misc/wc-parallel
tests/misc/xattr
tests/mkdir/selinux
tests/mv/acl
tests/mv/childproof
tests/mv/diag
tests/mv/dup-source
tests/mv/hard-2
tests/mv/i-2
tests/mv/part-symlink
tests/mv/update

index 2cfbcbbd750bc7e9965a667aa3c6b41a883c1ac8..20c232b94a23bcc39269d9bfae2a595cdece7ce9 100755 (executable)
@@ -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
index 3e93645abde908b9bd35c98dd6ae0449dbf1f42e..a3b909ae446807765a489c17589dcc11dcd9f7c1 100755 (executable)
@@ -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_
index c978ba253b19700f9e96b52ab84eb8122d734871..ad7bfa51144b0a9b030cd9772728839af0bda6d3 100755 (executable)
@@ -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
index bd0ef0ed89d3a6efaa82a1bcefca655757d81bbe..bcee4214f9dae6c8e9f860184584dc870052dea1 100755 (executable)
@@ -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_
index 346b24536de98cff5f49f9b4d6b7dfdfaa35fcc3..cb4709f50582d525b5108d646d17aef0ef2a15a6 100755 (executable)
@@ -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_
index a5190e4e701cdcba9af021532e17622ff7464762..6fa5293c7ce0caf3b767eb2682f6b49307e24b91 100755 (executable)
@@ -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_
index fdfc3f711174434f34772448e5370fcaffdaaa8f..189abe5b82112fbad6bdb552094c9d0b253d1bb1 100755 (executable)
@@ -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
index bf2dfcd52925d9474c6e1f0d524f4ec069ab9fd2..6b4f368d23b2417997e5970168b0a0e03a5c04b5 100755 (executable)
@@ -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_
index 51d023642bd455634e9d9c991a659394abe6be2e..909deb161a16cea0930a772d34fc2499dcc81846 100755 (executable)
@@ -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
index a4475e6d0577a9df0ee92429229a437f31f0ee04..462919f57ec9624d761cc67b23d7b720a594c7ef 100755 (executable)
@@ -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
index ed2e21d582a1d6cc9a499bc49127d828da55e7ed..c08856c01ec06097e294e869918d8e21bd8df0bd 100755 (executable)
@@ -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.
index 6f38b8b1bf47a7ad65d30e99a731de25631c7749..fdbc4c202547b9df9e3fbd63f316be30a8126203 100755 (executable)
@@ -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)
index dd82c0509696918a435b14622527c8ed65b4d03a..67173ed58e8f60bb1ef322b3bdadd556be5f3257 100755 (executable)
@@ -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
index cf376f3baca65a3169974852c6dae09e83717b22..b0fe19cdb333b5b815896b0865087b736e6ebb40 100755 (executable)
@@ -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_
index 39b70d6efc1965b63fa6120d10dd87b58cc24c56..864dc0bb2d325d9b5d2de44bce70bbda74b01ba0 100755 (executable)
@@ -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
index 702ab67a382ef702bef86e2bc3ecb276a26fc51d..53f46b58fb05e3c14629b301e328420325a138d9 100755 (executable)
@@ -18,7 +18,7 @@
 
 prog=printf
 
-. $srcdir/test-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
 test "$VERBOSE" = yes && env -- printf --version
 
 require_ulimit_
index c58207abe58d1dbd5391c6b760284bc789eaa0c0..b3d14c6ca729906e38f3e2c4d7521aa12b52184e 100755 (executable)
@@ -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_
index e4ecf11f96212fffd72433297f39e4476342b8f5..e01026674c7f4b9e9834d1abc8a9363336b0b552 100755 (executable)
@@ -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
index 1f3d914eb05bd76c17e072a8c901af6f99ec565c..b24a97c89cdfec9cb461dafc54fe47ea3fc3f4d3 100755 (executable)
@@ -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 &&
index 0a8259fef3e060c0f1d720e1ab4a21e7569c6b89..0d798c1d23e5ba17ff3662bf39dbe48484405d89 100755 (executable)
@@ -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_
index 8302c4896ff128e71197db7c2da7bbb190aa3404..4a694c7cde513c8a5ac5e341d86b421054a487b8 100755 (executable)
@@ -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_
index 0659d51a5e4dcf729bc553d349436731e7018d98..cc1d933a306e939fdd2c4270a5af2083f4ccdce9 100755 (executable)
@@ -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_
index 5acb3d0bbc992390d80cd38452d296d4c457e2fa..ed7fede977cc378d66880cde02fce46a9424495e 100755 (executable)
@@ -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_
index 4c57c945b56c8cf7f716375a0b3ca926b8cae0db..e8a0c5ff5343ae68b5f75808b18619fcdbec1f6f 100755 (executable)
@@ -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
index 705de2766e82edaf022c509f777c7ce3e36d04aa..5465f213a24025eab3cf94d2b971d6b2859aa784 100755 (executable)
@@ -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).
index 86fd5288e27e339007574ec0c5a55857f47bfd50..88aa63cbef5df7114dc92c5ab983d1509b8fee14 100755 (executable)
@@ -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_
index 47f10441c9baeee6c7a8861f35d64a17e06d277b..fd809f5f2f2dc5fcfde5f2e4725990ee9b9a8576 100755 (executable)
@@ -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)
index 3a27f15e0a2589120008be726c319a014227eb01..13e0857a595a983ca66e280b9e37289b79686df4 100755 (executable)
@@ -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:
index b0240eb0a0ea3b4053f1249f56fbf9e77d94a33a..f055cb8ac46f446941da5f4bf24ebd345c3738e6 100755 (executable)
@@ -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
index c67630ed0a7fcb18b8bc8c8b070a22e1dc991188..75f50078668681cc825ba4de6668ede9b7cbc1d0 100755 (executable)
@@ -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_
index 2e5e4611c87148d225639299f6cddee8a0e39fc4..ed6c1802e2a1bdd1a584c2d7bfdf9745235fef98 100755 (executable)
@@ -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_
index f40fc7c42b05b76a08de9785ee43c0bf6eafd263..d32513d9b556bcecf72d4cf1c25749e9734b7c4b 100755 (executable)
@@ -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
index 9ede87ef62f6472d5af80580119a5c2601e13813..34ef63332bdfff4727779280d86619958bb90d9f 100755 (executable)
@@ -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_
index 704e2679d41252ea3c645c6e72be3c706c55d316..eb83b117f20454d71695f6486c09b430017fec18 100755 (executable)
@@ -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_
index 83596426e29472f661f5b188aebe98a692bf81f1..7e49bcadd51b03fb6e7dd63cc64f521773f3bea2 100755 (executable)
@@ -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_
index bf2fd451ac8ddf125a9cab827d07fa8d3f757acd..3f67d6cdd9d80d653c8b8bce018b9de8ddcd44a5 100755 (executable)
@@ -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"; }
index b0a532c635215d48b2f324e37375c0131df4048f..5bee53cb2e1f48236d13cc71289e8ba50a413483 100755 (executable)
@@ -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