diff options
author | Jim Meyering <meyering@fb.com> | 2014-07-01 09:40:50 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-07-02 09:07:26 -0700 |
commit | 04fc32f7e038e92e033c770211749be683c74973 (patch) | |
tree | f700df8b05061ca8eb845185dd2f057812f6b8fc /tests/touch/no-create-missing.sh | |
parent | 28d1dc525182c347f2346c52fa7b5ab4a9b1a148 (diff) | |
download | coreutils-04fc32f7e038e92e033c770211749be683c74973.tar.xz |
tests: use "env builtin" in place of "$abs_top_builddir/src/builtin"
This works for any program that might also be a shell built-in.
It is more concise. In addition, it makes output more reproducible:
some diagnostics include argv[0], which will now be just the program
name, rather than the full absolute name of the executable.
* tests/misc/sort-compress.sh: Use env kill, rather than absolute name.
* tests/install/trap.sh: Likewise.
* tests/misc/timeout.sh: Likewise.
* tests/touch/no-dereference.sh: Do the same for two uses of "test".
* tests/touch/no-create-missing.sh: Likewise.
Diffstat (limited to 'tests/touch/no-create-missing.sh')
-rwxr-xr-x | tests/touch/no-create-missing.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/touch/no-create-missing.sh b/tests/touch/no-create-missing.sh index 4e5056e1a..7ce63b1b7 100755 --- a/tests/touch/no-create-missing.sh +++ b/tests/touch/no-create-missing.sh @@ -24,13 +24,11 @@ touch -c no-file > /dev/null 2>&1 || fail=1 touch -cm no-file > /dev/null 2>&1 || fail=1 touch -ca no-file > /dev/null 2>&1 || fail=1 -test="$abs_top_builddir/src/test" - # If >&- works, test "touch -c -" etc. # >&- apparently does not work in HP-UX 11.23. # This test is ineffective unless /dev/stdout also works. -if "$test" -w /dev/stdout >/dev/null && - "$test" ! -w /dev/stdout >&-; then +if env test -w /dev/stdout >/dev/null && + env test ! -w /dev/stdout >&-; then touch -c - >&- 2> /dev/null || fail=1 touch -cm - >&- 2> /dev/null || fail=1 touch -ca - >&- 2> /dev/null || fail=1 |