summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-02-10 08:55:59 +0100
committerJim Meyering <meyering@redhat.com>2010-02-10 08:55:59 +0100
commitb22f6671d773e326fdc9c4b096a5c056c6cd0509 (patch)
tree0ec9b957a9fba21a25c7497e046fdc1c4607cf03 /tests
parenta1dcb61f03265e69a0ebd4f09deb45af3e1a56b9 (diff)
downloaddiffutils-b22f6671d773e326fdc9c4b096a5c056c6cd0509.tar.gz
tests: honor VERBOSE
* tests/basic: Enable "set -x" if $VERBOSE. * tests/help-version: Likewise. * tests/label-vs-func: Likewise. * tests/stdin: Likewise.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic4
-rwxr-xr-xtests/help-version5
-rwxr-xr-xtests/label-vs-func4
-rwxr-xr-xtests/stdin4
4 files changed, 11 insertions, 6 deletions
diff --git a/tests/basic b/tests/basic
index e2979d2..87bb7d8 100755
--- a/tests/basic
+++ b/tests/basic
@@ -1,7 +1,9 @@
#!/bin/sh
# small examples
+
+test "$VERBOSE" = yes && set -x
: ${srcdir=.}
-. "$srcdir/init.sh"; path_prepend_ .
+. "$srcdir/init.sh"
fail=0
diff --git a/tests/help-version b/tests/help-version
index 5049397..a51ff24 100755
--- a/tests/help-version
+++ b/tests/help-version
@@ -17,16 +17,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-test "$VERBOSE" = yes && set -x
-
# Ensure that $SHELL is set to *some* value and exported.
# This is required for dircolors, which would fail e.g., when
# invoked via debuild (which removes SHELL from the environment).
test "x$SHELL" = x && SHELL=/bin/sh
export SHELL
+test "$VERBOSE" = yes && set -x
: ${srcdir=.}
-. "$srcdir/init.sh"; path_prepend_ ../src
+. "$srcdir/init.sh"
expected_failure_status_chroot=125
expected_failure_status_env=125
diff --git a/tests/label-vs-func b/tests/label-vs-func
index 77b11f2..c862bed 100755
--- a/tests/label-vs-func
+++ b/tests/label-vs-func
@@ -1,7 +1,9 @@
#!/bin/sh
# Show how diff's -p option can mistakenly match a label: in column 1.
+
+test "$VERBOSE" = yes && set -x
: ${srcdir=.}
-. "$srcdir/init.sh"; path_prepend_ .
+. "$srcdir/init.sh"
fail=0
cat <<EOF > exp || fail=1
diff --git a/tests/stdin b/tests/stdin
index 673d8b0..3c114bd 100755
--- a/tests/stdin
+++ b/tests/stdin
@@ -1,7 +1,9 @@
#!/bin/sh
# Ensure that "-" means "standard input".
+
+test "$VERBOSE" = yes && set -x
: ${srcdir=.}
-. "$srcdir/init.sh"; path_prepend_ .
+. "$srcdir/init.sh"
fail=0