From 2457af43cf6d670ab120c19bf4f23ac545ff24b5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 22 Oct 2006 19:37:31 +0200 Subject: * tests/sample-test: Quote variables containing absolute build tree paths. In the cleanup trap, make sure `cd' succeeds before `chmod'ing and `rm'ing the temporary files. * tests/chgrp/basic: Likewise. * tests/chgrp/deref: Likewise. * tests/chgrp/no-x: Likewise. * tests/chgrp/posix-H: Likewise. * tests/chgrp/recurse: Likewise. * tests/chmod/c-option: Likewise. * tests/chmod/equal-x: Likewise. * tests/chmod/equals: Likewise. * tests/chmod/inaccessible: Likewise. * tests/chmod/no-x: Likewise. * tests/chmod/octal: Likewise. * tests/chmod/setgid: Likewise. * tests/chmod/umask-x: Likewise. * tests/chmod/usage: Likewise. * tests/chown/basic: Likewise. * tests/chown/deref: Likewise. * tests/chown/separator: Likewise. * tests/cp/acl: Likewise. * tests/cp/backup-1: Likewise. * tests/cp/backup-dir: Likewise. * tests/cp/backup-is-src: Likewise. * tests/cp/cp-HL: Likewise. * tests/cp/cp-deref: Likewise. * tests/cp/cp-i: Likewise. * tests/cp/cp-mv-backup: Likewise. * tests/cp/cp-parents: Likewise. * tests/cp/deref-slink: Likewise. * tests/cp/dir-rm-dest: Likewise. * tests/cp/dir-slash: Likewise. * tests/cp/dir-vs-file: Likewise. * tests/cp/fail-perm: Likewise. * tests/cp/into-self: Likewise. * tests/cp/link: Likewise. * tests/cp/link-no-deref: Likewise. * tests/cp/link-preserve: Likewise. * tests/cp/no-deref-link1: Likewise. * tests/cp/no-deref-link2: Likewise. * tests/cp/no-deref-link3: Likewise. * tests/cp/perm: Likewise. * tests/cp/preserve-2: Likewise. * tests/cp/r-vs-symlink: Likewise. * tests/cp/same-file: Likewise. * tests/cp/slink-2-slink: Likewise. * tests/cp/sparse: Likewise. * tests/cp/special-bits: Likewise. * tests/cp/src-base-dot: Likewise. * tests/cp/symlink-slash: Likewise. * tests/dd/not-rewound: Likewise. * tests/dd/skip-seek2: Likewise. * tests/dd/unblock-sync: Likewise. * tests/du/2g: Likewise. * tests/du/8gb: Likewise. * tests/du/basic: Likewise. * tests/du/deref: Likewise. * tests/du/deref-args: Likewise. * tests/du/exclude: Likewise. * tests/du/fd-leak: Likewise. * tests/du/hard-link: Likewise. * tests/du/inaccessible-cwd: Likewise. * tests/du/long-from-unreadable: Likewise. * tests/du/long-sloop: Likewise. * tests/du/no-deref: Likewise. * tests/du/no-x: Likewise. * tests/du/restore-wd: Likewise. * tests/du/slash: Likewise. * tests/du/slink: Likewise. * tests/du/trailing-slash: Likewise. * tests/du/two-args: Likewise. * tests/fmt/long-line: Likewise. * tests/install/basic-1: Likewise. * tests/install/create-leading: Likewise. * tests/install/d-slashdot: Likewise. * tests/install/trap: Likewise. * tests/ln/misc: Likewise. * tests/ln/target-1: Likewise. * tests/ls/color-dtype-dir: Likewise. * tests/ls/dangle: Likewise. * tests/ls/dired: Likewise. * tests/ls/file-type: Likewise. * tests/ls/follow-slink: Likewise. * tests/ls/infloop: Likewise. * tests/ls/inode: Likewise. * tests/ls/m-option: Likewise. * tests/ls/no-arg: Likewise. * tests/ls/recursive: Likewise. * tests/ls/rt-1: Likewise. * tests/ls/stat-dtype: Likewise. * tests/ls/stat-failed: Likewise. * tests/ls/stat-vs-dirent: Likewise. * tests/misc/cat-proc: Likewise. * tests/misc/close-stdout: Likewise. * tests/misc/csplit: Likewise. * tests/misc/date-sec: Likewise. * tests/misc/false-status: Likewise. * tests/misc/head-c: Likewise. * tests/misc/head-pos: Likewise. * tests/misc/mknod: Likewise. * tests/misc/nl: Likewise. * tests/misc/nohup: Likewise. * tests/misc/pathchk1: Likewise. * tests/misc/printf: Likewise. * tests/misc/printf-hex: Likewise. * tests/misc/pwd-long: Likewise. * tests/misc/shuf: Likewise. * tests/misc/sort-rand: Likewise. * tests/misc/split-a: Likewise. * tests/misc/split-fail: Likewise. * tests/misc/split-l: Likewise. * tests/misc/stat-fmt: Likewise. * tests/misc/tac-continue: Likewise. * tests/misc/wc-files0: Likewise. * tests/mkdir/concurrent-1: Likewise. * tests/mkdir/p-1: Likewise. * tests/mkdir/p-2: Likewise. * tests/mkdir/p-3: Likewise. * tests/mkdir/p-slashdot: Likewise. * tests/mkdir/p-thru-slink: Likewise. * tests/mkdir/p-v: Likewise. * tests/mkdir/parents: Likewise. * tests/mkdir/perm: Likewise. * tests/mkdir/t-slash: Likewise. * tests/mv/acl: Likewise. * tests/mv/atomic: Likewise. * tests/mv/backup-dir: Likewise. * tests/mv/childproof: Likewise. * tests/mv/diag: Likewise. * tests/mv/dir-file: Likewise. * tests/mv/dir2dir: Likewise. * tests/mv/dup-source: Likewise. * tests/mv/hard-2: Likewise. * tests/mv/hard-3: Likewise. * tests/mv/hard-4: Likewise. * tests/mv/hard-link-1: Likewise. * tests/mv/hard-verbose: Likewise. * tests/mv/i-2: Likewise. * tests/mv/i-3: Likewise. * tests/mv/i-4: Likewise. * tests/mv/i-5: Likewise. * tests/mv/i-link-no: Likewise. * tests/mv/into-self-4: Likewise. * tests/mv/leak-fd: Likewise. * tests/mv/mv-special-1: Likewise. * tests/mv/no-target-dir: Likewise. * tests/mv/part-fail: Likewise. * tests/mv/part-hardlink: Likewise. * tests/mv/part-rename: Likewise. * tests/mv/part-symlink: Likewise. * tests/mv/partition-perm: Likewise. * tests/mv/perm-1: Likewise. * tests/mv/reply-no: Likewise. * tests/mv/trailing-slash: Likewise. * tests/mv/update: Likewise. * tests/od/od-N: Likewise. * tests/od/x8: Likewise. * tests/readlink/can-e: Likewise. * tests/readlink/can-f: Likewise. * tests/readlink/can-m: Likewise. * tests/readlink/rl-1: Likewise. * tests/rm/cycle: Likewise. * tests/rm/dangling-symlink: Likewise. * tests/rm/deep-1: Likewise. * tests/rm/dir-no-w: Likewise. * tests/rm/dir-nonrecur: Likewise. * tests/rm/dot-rel: Likewise. * tests/rm/empty-inacc: Likewise. * tests/rm/f-1: Likewise. * tests/rm/fail-2eperm: Likewise. * tests/rm/hash: Likewise. * tests/rm/i-1: Likewise. * tests/rm/i-no-r: Likewise. * tests/rm/ignorable: Likewise. * tests/rm/inaccessible: Likewise. * tests/rm/interactive-always: Likewise. * tests/rm/interactive-once: Likewise. * tests/rm/ir-1: Likewise. * tests/rm/isatty: Likewise. * tests/rm/no-give-up: Likewise. * tests/rm/r-1: Likewise. * tests/rm/r-2: Likewise. * tests/rm/r-3: Likewise. * tests/rm/r-4: Likewise. * tests/rm/readdir-bug: Likewise. * tests/rm/rm1: Likewise. * tests/rm/rm2: Likewise. * tests/rm/rm3: Likewise. * tests/rm/rm4: Likewise. * tests/rm/rm5: Likewise. * tests/rm/sunos-1: Likewise. * tests/rm/unread2: Likewise. * tests/rm/unread3: Likewise. * tests/rmdir/fail-perm: Likewise. * tests/rmdir/t-slash: Likewise. * tests/shred/exact: Likewise. * tests/shred/remove: Likewise. * tests/sum/sysv: Likewise. * tests/tail-2/append-only: Likewise. * tests/tail-2/assert: Likewise. * tests/tail-2/assert-2: Likewise. * tests/tail-2/big-4gb: Likewise. * tests/tail-2/fflush: Likewise. * tests/tail-2/infloop-1: Likewise. * tests/tail-2/proc-ksyms: Likewise. * tests/tail-2/start-middle: Likewise. * tests/tail-2/tail-n0f: Likewise. * tests/tee/basic: Likewise. * tests/tee/dash: Likewise. * tests/touch/fail-diag: Likewise. * tests/touch/no-create-missing: Likewise. * tests/touch/not-owner: Likewise. * tests/touch/obsolescent: Likewise. * tests/touch/read-only: Likewise. * tests/touch/relative: Likewise. --- tests/misc/cat-proc | 2 +- tests/misc/close-stdout | 14 +++++++------- tests/misc/csplit | 2 +- tests/misc/date-sec | 4 ++-- tests/misc/false-status | 2 +- tests/misc/head-c | 4 ++-- tests/misc/head-pos | 4 ++-- tests/misc/mknod | 2 +- tests/misc/nl | 4 ++-- tests/misc/nohup | 2 +- tests/misc/pathchk1 | 4 ++-- tests/misc/printf | 38 +++++++++++++++++++------------------- tests/misc/printf-hex | 8 ++++---- tests/misc/pwd-long | 6 +++--- tests/misc/shuf | 2 +- tests/misc/sort-rand | 2 +- tests/misc/split-a | 4 ++-- tests/misc/split-fail | 4 ++-- tests/misc/split-l | 4 ++-- tests/misc/stat-fmt | 4 ++-- tests/misc/tac-continue | 4 ++-- tests/misc/wc-files0 | 2 +- 22 files changed, 61 insertions(+), 61 deletions(-) (limited to 'tests/misc') diff --git a/tests/misc/cat-proc b/tests/misc/cat-proc index d6ff5011b..22f384765 100755 --- a/tests/misc/cat-proc +++ b/tests/misc/cat-proc @@ -26,7 +26,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/close-stdout b/tests/misc/close-stdout index a232fd746..01edf32c4 100755 --- a/tests/misc/close-stdout +++ b/tests/misc/close-stdout @@ -26,7 +26,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 @@ -56,21 +56,21 @@ mv d e >&- || fail=1 rmdir e >&- || fail=1 touch e >&- || fail=1 sleep 0 >&- || fail=1 -$pwd/../../src/true >&- || fail=1 -$pwd/../../src/printf '' >&- || fail=1 +"$pwd"/../../src/true >&- || fail=1 +"$pwd"/../../src/printf '' >&- || fail=1 # If >&- works, ensure these fail, because stdout is closed and they # *do* generate output. >&- apparently does not work in HP-UX 11.23. # This test is ineffective unless /dev/stdout also works. -if $pwd/../../src/test -w /dev/stdout >/dev/null && - $pwd/../../src/test ! -w /dev/stdout >&-; then - $pwd/../../src/printf 'foo' >&- 2>/dev/null && fail=1 +if "$pwd"/../../src/test -w /dev/stdout >/dev/null && + "$pwd"/../../src/test ! -w /dev/stdout >&-; then + "$pwd"/../../src/printf 'foo' >&- 2>/dev/null && fail=1 cp --verbose a b >&- 2>/dev/null && fail=1 fi # Likewise for /dev/full, if /dev/full works. if test -w /dev/full && test -c /dev/full; then - $pwd/../../src/printf 'foo' >/dev/full 2>/dev/null && fail=1 + "$pwd"/../../src/printf 'foo' >/dev/full 2>/dev/null && fail=1 cp --verbose a b >/dev/full 2>/dev/null && fail=1 fi diff --git a/tests/misc/csplit b/tests/misc/csplit index 1feea6645..885d6928a 100755 --- a/tests/misc/csplit +++ b/tests/misc/csplit @@ -28,7 +28,7 @@ fi pwd=`pwd` tmp=csplit.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/date-sec b/tests/misc/date-sec index aac1e0a98..222b5cfdc 100755 --- a/tests/misc/date-sec +++ b/tests/misc/date-sec @@ -3,7 +3,7 @@ # `date --date="21:04 +0100" +%S' always prints `00'. # Before coreutils-5.2.1, it would print the seconds from the current time. -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2006 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 @@ -27,7 +27,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/false-status b/tests/misc/false-status index 0397c2992..612b5f90c 100755 --- a/tests/misc/false-status +++ b/tests/misc/false-status @@ -25,7 +25,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/head-c b/tests/misc/head-c index 387a5be8f..ba13c32bc 100755 --- a/tests/misc/head-c +++ b/tests/misc/head-c @@ -1,7 +1,7 @@ #!/bin/sh # exercise the fix of 2001-08-18, based on test case from Ian Bruce -# Copyright (C) 2001, 2004 Free Software Foundation, Inc. +# Copyright (C) 2001, 2004, 2006 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,7 +25,7 @@ fi pwd=`pwd` tmp=head-c.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/head-pos b/tests/misc/head-pos index edb334311..9069febf3 100755 --- a/tests/misc/head-pos +++ b/tests/misc/head-pos @@ -2,7 +2,7 @@ # When reading a specified number of lines, ensure that the output # file pointer is positioned just after those lines. -# Copyright (C) 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2006 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 @@ -26,7 +26,7 @@ fi pwd=`pwd` tmp=head-pos.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/mknod b/tests/misc/mknod index ca15feb8a..12cb0a623 100755 --- a/tests/misc/mknod +++ b/tests/misc/mknod @@ -25,7 +25,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/nl b/tests/misc/nl index 2244ae281..72d2c2132 100755 --- a/tests/misc/nl +++ b/tests/misc/nl @@ -1,7 +1,7 @@ #!/bin/sh # exercise nl functionality -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2006 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,7 +25,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/nohup b/tests/misc/nohup index d44d3f986..61664738b 100755 --- a/tests/misc/nohup +++ b/tests/misc/nohup @@ -28,7 +28,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/pathchk1 b/tests/misc/pathchk1 index eb7b462ad..9305f0c2d 100755 --- a/tests/misc/pathchk1 +++ b/tests/misc/pathchk1 @@ -1,7 +1,7 @@ #!/bin/sh # pathchk tests -# Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2005, 2006 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 @@ -27,7 +27,7 @@ PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/printf b/tests/misc/printf index 6b29277b0..481cb37a2 100755 --- a/tests/misc/printf +++ b/tests/misc/printf @@ -1,7 +1,7 @@ #!/bin/sh # basic tests for printf -# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2006 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,12 +22,12 @@ prog=`pwd`/../../src/printf if test "$VERBOSE" = yes; then set -x - $prog --version + "$prog" --version fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 @@ -43,7 +43,7 @@ fail=0 # This would fail (by printing the `--') for printf in sh-utils # and in coreutils 4.5.1. -$prog -- 'foo\n' > out || fail=1 +"$prog" -- 'foo\n' > out || fail=1 cat <<\EOF > exp foo EOF @@ -53,46 +53,46 @@ test $fail = 1 && diff out exp 2> /dev/null rm -f out exp # Until coreutils-4.5.10, this would elicit a segfault. -$prog '1 %*sy\n' -3 x > out || fail=1 +"$prog" '1 %*sy\n' -3 x > out || fail=1 # Until coreutils 5.2.2, this would succeed. -if POSIXLY_CORRECT=1 $prog '2 \x' >/dev/null 2>&1; then +if POSIXLY_CORRECT=1 "$prog" '2 \x' >/dev/null 2>&1; then fail=1 else echo '2 failed, as expected' >> out fi # Until coreutils-4.5.12, these would fail. -$prog '3 \x40\n' >> out || fail=1 +"$prog" '3 \x40\n' >> out || fail=1 POSIXLY_CORRECT=1 \ -$prog '4 \x40\n' >> out || fail=1 -$prog '5 % +d\n' 234 >> out || fail=1 +"$prog" '4 \x40\n' >> out || fail=1 +"$prog" '5 % +d\n' 234 >> out || fail=1 # This should print "6 !\n", but don't rely on `!' being the # one-byte representation of octal 041. With printf prior to # coreutils-5.0.1, it would print six bytes: "6 \41\n". -$prog '6 \41\n' | tr '\41' '!' >> out +"$prog" '6 \41\n' | tr '\41' '!' >> out # Note that as of coreutils-5.0.1, printf with a format of '\0002x' # prints a NUL byte followed by the digit `2' and an `x'. # By contrast bash's printf outputs the same thing as $(printf '\2x') does. -$prog '7 \2y \02y \002y \0002y\n' |tr '\0\2' '*=' >> out +"$prog" '7 \2y \02y \002y \0002y\n' |tr '\0\2' '*=' >> out -$prog '8 %b %b %b %b\n' '\1y' '\01y' '\001y' '\0001y'|tr '\1' = >> out +"$prog" '8 %b %b %b %b\n' '\1y' '\01y' '\001y' '\0001y'|tr '\1' = >> out -$prog '9 %*dx\n' -2 0 >>out || fail=1 +"$prog" '9 %*dx\n' -2 0 >>out || fail=1 -$prog '10 %.*dx\n' -2147483648 0 >>out || fail=1 +"$prog" '10 %.*dx\n' -2147483648 0 >>out || fail=1 -$prog '11 %*c\n' 2 x >>out || fail=1 +"$prog" '11 %*c\n' 2 x >>out || fail=1 -$prog '%#d\n' 0 >>out 2> /dev/null && fail=1 +"$prog" '%#d\n' 0 >>out 2> /dev/null && fail=1 -$prog '%0s\n' 0 >>out 2> /dev/null && fail=1 +"$prog" '%0s\n' 0 >>out 2> /dev/null && fail=1 -$prog '%.9c\n' 0 >>out 2> /dev/null && fail=1 +"$prog" '%.9c\n' 0 >>out 2> /dev/null && fail=1 -$prog '%'\''s\n' 0 >>out 2> /dev/null && fail=1 +"$prog" '%'\''s\n' 0 >>out 2> /dev/null && fail=1 cat <<\EOF > exp 1 x y diff --git a/tests/misc/printf-hex b/tests/misc/printf-hex index df001cd8d..d3d5d04b2 100755 --- a/tests/misc/printf-hex +++ b/tests/misc/printf-hex @@ -1,7 +1,7 @@ #!/bin/sh # make sure that only two hex. digits are consumed in a \xHHH sequence -# Copyright (C) 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2006 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,12 +22,12 @@ prog=`pwd`/../../src/printf if test "$VERBOSE" = yes; then set -x - $prog --version + "$prog" --version fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 @@ -41,7 +41,7 @@ fi fail=0 -$prog '\x7e3\n' > out || fail=1 +"$prog" '\x7e3\n' > out || fail=1 cat <<\EOF > exp ~3 EOF diff --git a/tests/misc/pwd-long b/tests/misc/pwd-long index c4af777f3..bf6d00441 100755 --- a/tests/misc/pwd-long +++ b/tests/misc/pwd-long @@ -27,9 +27,9 @@ $PERL -e 1 > /dev/null 2>&1 || { } framework_failure=0 -pwd=`${BUILD_SRC_DIR?}/pwd` || framework_failure=1 +pwd=`"${BUILD_SRC_DIR?}"/pwd` || framework_failure=1 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 mkdir -p $tmp || framework_failure=1 @@ -75,7 +75,7 @@ $build_src_dir my $pwd_binary = "$build_src_dir/pwd"; -x $pwd_binary or die "$ME: $pwd_binary is not an executable file\n"; -chomp (my $actual = `$pwd_binary`); +chomp (my $actual = `"$pwd_binary"`); if ($expected ne $actual) { my $e_len = length $expected; diff --git a/tests/misc/shuf b/tests/misc/shuf index 17a74dd3f..760bd4921 100755 --- a/tests/misc/shuf +++ b/tests/misc/shuf @@ -25,7 +25,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/sort-rand b/tests/misc/sort-rand index 04bcc477f..f9973186e 100755 --- a/tests/misc/sort-rand +++ b/tests/misc/sort-rand @@ -25,7 +25,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/split-a b/tests/misc/split-a index 3ae4736c2..7dfe31954 100755 --- a/tests/misc/split-a +++ b/tests/misc/split-a @@ -1,7 +1,7 @@ #!/bin/sh # Show that split -a works. -# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2006 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,7 +25,7 @@ fi pwd=`pwd` tmp=split-a.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/split-fail b/tests/misc/split-fail index 1268190b8..70435b453 100755 --- a/tests/misc/split-fail +++ b/tests/misc/split-fail @@ -1,7 +1,7 @@ #!/bin/sh # split must fail when given length/count of zero. -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006 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 @@ -27,7 +27,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/split-l b/tests/misc/split-l index 27c4c3f1b..44916837e 100755 --- a/tests/misc/split-l +++ b/tests/misc/split-l @@ -1,7 +1,7 @@ #!/bin/sh # show that `split --lines=2' works. -# Copyright (C) 2002 Free Software Foundation, Inc. +# Copyright (C) 2002, 2006 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,7 +25,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/stat-fmt b/tests/misc/stat-fmt index 560ea1014..435fbbb55 100755 --- a/tests/misc/stat-fmt +++ b/tests/misc/stat-fmt @@ -1,7 +1,7 @@ #!/bin/sh # ensure that stat properly handles a format string ending with % -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2006 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,7 +25,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/tac-continue b/tests/misc/tac-continue index 41764296b..d8f50ffc4 100755 --- a/tests/misc/tac-continue +++ b/tests/misc/tac-continue @@ -3,7 +3,7 @@ # when it encounters an error with say the first one. # With coreutils-5.2.1 and earlier, this test would fail. -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2006 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 @@ -41,7 +41,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 diff --git a/tests/misc/wc-files0 b/tests/misc/wc-files0 index 758024aa7..8991e7e12 100755 --- a/tests/misc/wc-files0 +++ b/tests/misc/wc-files0 @@ -27,7 +27,7 @@ fi pwd=`pwd` t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ -trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 framework_failure=0 -- cgit v1.2.3-54-g00ecf