diff options
author | anton <anton@cvs.openbsd.org> | 2017-10-16 13:48:23 +0000 |
---|---|---|
committer | anton <anton@cvs.openbsd.org> | 2017-10-16 13:48:23 +0000 |
commit | 472d793f3e29b5f331631ed2ef72e8bb3c9efd95 (patch) | |
tree | 7015bf42307f1e7c696b481a5394cfcf57538204 /regress/usr.bin/xargs | |
parent | ced92a6f6788df0bd8f707a4a96ed18448bb3607 (diff) |
Specify the xargs binary to test using a variable.
While here, do not suppress the command executed by make.
Diffstat (limited to 'regress/usr.bin/xargs')
-rw-r--r-- | regress/usr.bin/xargs/Makefile | 6 | ||||
-rwxr-xr-x | regress/usr.bin/xargs/xargs-L.sh | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/regress/usr.bin/xargs/Makefile b/regress/usr.bin/xargs/Makefile index 6a626e57b4e..b2ad896bb55 100644 --- a/regress/usr.bin/xargs/Makefile +++ b/regress/usr.bin/xargs/Makefile @@ -1,8 +1,10 @@ -# $OpenBSD: Makefile,v 1.2 2017/01/20 12:19:02 bluhm Exp $ +# $OpenBSD: Makefile,v 1.3 2017/10/16 13:48:22 anton Exp $ + +XARGS= /usr/bin/xargs PROG= showargs run-regress-showargs: - @sh ${.CURDIR}/xargs-L.sh + sh ${.CURDIR}/xargs-L.sh ${XARGS} .include <bsd.regress.mk> diff --git a/regress/usr.bin/xargs/xargs-L.sh b/regress/usr.bin/xargs/xargs-L.sh index 295e691ee4e..50477de3f44 100755 --- a/regress/usr.bin/xargs/xargs-L.sh +++ b/regress/usr.bin/xargs/xargs-L.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: xargs-L.sh,v 1.2 2017/01/19 17:08:42 millert Exp $ +# $OpenBSD: xargs-L.sh,v 1.3 2017/10/16 13:48:22 anton Exp $ # # written by Ingo Schwarze <schwarze@openbsd.org> 2010 # and placed in the public domain @@ -9,13 +9,15 @@ test_xargs() { printf 'Testing %13.13s with options "%s"\n' "\"$1\"" "$2" expect=`printf "$3"` - result=`printf "$1" | xargs $2 ./showargs` + result=`printf "$1" | $XARGS $2 ./showargs` if [ "$result" != "$expect" ]; then printf 'Expected "%s", but got "%s"\n' "$expect" "$result" exit 1 fi } +XARGS=${1:-/usr/bin/xargs} + test_xargs 'a b' '' 'a|b|' test_xargs 'a b' '' 'a|b|' test_xargs 'a\nb' '' 'a|b|' |