diff options
-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|' |