summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Coreutils.pm2
-rwxr-xr-xtests/misc/help-version12
-rwxr-xr-xtests/misc/printf-surprise6
3 files changed, 9 insertions, 11 deletions
diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm
index 2406dd107..3245eda6e 100644
--- a/tests/Coreutils.pm
+++ b/tests/Coreutils.pm
@@ -217,7 +217,7 @@ sub run_tests ($$$$$)
# To indicate that $prog is a shell built-in, you'd make it a string 'ref'.
# E.g., call run_tests ($prog, \$prog, \@Tests, $save_temps, $verbose);
# If it's a ref, invoke it via "env":
- my @prog = ref $prog ? ('env', $$prog) : $prog;
+ my @prog = ref $prog ? (qw(env --), $$prog) : $prog;
# Warn about empty t_spec.
# FIXME
diff --git a/tests/misc/help-version b/tests/misc/help-version
index b14c1536a..77e54c7b4 100755
--- a/tests/misc/help-version
+++ b/tests/misc/help-version
@@ -50,10 +50,8 @@ for lang in C fr da; do
# false fails even when invoked with --help or --version.
if test $i = false; then
- env LC_MESSAGES=$lang "$abs_top_builddir/src/$i" --help \
- >/dev/null && fail=1
- env LC_MESSAGES=$lang "$abs_top_builddir/src/$i" --version \
- >/dev/null && fail=1
+ env LC_MESSAGES=$lang $i" --help >/dev/null && fail=1
+ env LC_MESSAGES=$lang $i" --version >/dev/null && fail=1
continue
fi
@@ -61,8 +59,8 @@ for lang in C fr da; do
test $i = install && i=ginstall
# Make sure they exit successfully, under normal conditions.
- "$abs_top_builddir/src/$i" --help > h-$i || fail=1
- "$abs_top_builddir/src/$i" --version >/dev/null || fail=1
+ env $i --help > h-$i || fail=1
+ env $i --version >/dev/null || fail=1
# Make sure they mention the bug-reporting address in --help output.
grep "$PACKAGE_BUGREPORT" h-$i > /dev/null || fail=1
@@ -188,7 +186,7 @@ for i in $built_programs; do
# echo ================== $i
test $i = [ && prog=lbracket || prog=$i
eval "args=\$${prog}_args"
- if "$abs_top_builddir/src/$i" $args < $tmp_in > $tmp_out; then
+ if env $i $args < $tmp_in > $tmp_out; then
: # ok
else
echo FAIL: $i
diff --git a/tests/misc/printf-surprise b/tests/misc/printf-surprise
index 905660262..64fdad017 100755
--- a/tests/misc/printf-surprise
+++ b/tests/misc/printf-surprise
@@ -16,11 +16,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-prog="$abs_top_builddir/src/printf"
+prog=printf
if test "$VERBOSE" = yes; then
set -x
- "$prog" --version
+ env $prog --version
fi
. $top_srcdir/tests/test-lib.sh
@@ -50,7 +50,7 @@ fail=0
# triggering the printf(3) misbehavior -- which, btw, is required by ISO C99.
( ulimit -v 10000
- "$prog" %20000000f 0 2>err | head -c 10 >out )
+ env $prog %20000000f 0 2>err | head -c 10 >out )
# Map this longer, and rarer, diagnostic to the common one.
# printf: cannot perform formatted output: Cannot allocate memory" \