diff options
Diffstat (limited to 'usr.bin/bmake/tests/shell/replace')
| -rw-r--r-- | usr.bin/bmake/tests/shell/replace/Makefile | 17 | ||||
| -rw-r--r-- | usr.bin/bmake/tests/shell/replace/Makefile.test | 21 | ||||
| -rw-r--r-- | usr.bin/bmake/tests/shell/replace/expected.status.1 | 1 | ||||
| -rw-r--r-- | usr.bin/bmake/tests/shell/replace/expected.status.2 | 1 | ||||
| -rw-r--r-- | usr.bin/bmake/tests/shell/replace/expected.stderr.1 | 0 | ||||
| -rw-r--r-- | usr.bin/bmake/tests/shell/replace/expected.stderr.2 | 0 | ||||
| -rw-r--r-- | usr.bin/bmake/tests/shell/replace/expected.stdout.1 | 3 | ||||
| -rw-r--r-- | usr.bin/bmake/tests/shell/replace/expected.stdout.2 | 6 | ||||
| -rw-r--r-- | usr.bin/bmake/tests/shell/replace/legacy_test.sh | 17 | ||||
| -rw-r--r-- | usr.bin/bmake/tests/shell/replace/shell | 6 |
10 files changed, 72 insertions, 0 deletions
diff --git a/usr.bin/bmake/tests/shell/replace/Makefile b/usr.bin/bmake/tests/shell/replace/Makefile new file mode 100644 index 000000000000..0dae9154bf33 --- /dev/null +++ b/usr.bin/bmake/tests/shell/replace/Makefile @@ -0,0 +1,17 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/bmake/shell/replace + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= Makefile.test +FILES+= expected.status.1 +FILES+= expected.status.2 +FILES+= expected.stderr.1 +FILES+= expected.stderr.2 +FILES+= expected.stdout.1 +FILES+= expected.stdout.2 +FILES+= shell + +.include <bsd.test.mk> diff --git a/usr.bin/bmake/tests/shell/replace/Makefile.test b/usr.bin/bmake/tests/shell/replace/Makefile.test new file mode 100644 index 000000000000..2160dbfb5776 --- /dev/null +++ b/usr.bin/bmake/tests/shell/replace/Makefile.test @@ -0,0 +1,21 @@ +# +# Test that we can replace the shell and set all the shell parameters +# (except meta and builtin which have their own test). This is done by +# using a shell script for the shell that echoes all command line +# arguments and its standard input. The shell name should not be one of +# the builtin shells. +# +# XXX There seems to be a problem here in -j1 mode: for the line without +# @- make should switch on echoing again, but it doesn't. +# +# $FreeBSD$ + +.SHELL: name="shell" path="${.CURDIR}/shell" \ + quiet="be quiet" echo="be verbose" filter="be verbose" \ + echoFlag="x" errFlag="y" \ + hasErrCtl=y check="check errors" ignore="ignore errors" + +.PHONY: test1 +test1: + -@funny $$ + funnier $$ diff --git a/usr.bin/bmake/tests/shell/replace/expected.status.1 b/usr.bin/bmake/tests/shell/replace/expected.status.1 new file mode 100644 index 000000000000..573541ac9702 --- /dev/null +++ b/usr.bin/bmake/tests/shell/replace/expected.status.1 @@ -0,0 +1 @@ +0 diff --git a/usr.bin/bmake/tests/shell/replace/expected.status.2 b/usr.bin/bmake/tests/shell/replace/expected.status.2 new file mode 100644 index 000000000000..573541ac9702 --- /dev/null +++ b/usr.bin/bmake/tests/shell/replace/expected.status.2 @@ -0,0 +1 @@ +0 diff --git a/usr.bin/bmake/tests/shell/replace/expected.stderr.1 b/usr.bin/bmake/tests/shell/replace/expected.stderr.1 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/usr.bin/bmake/tests/shell/replace/expected.stderr.1 diff --git a/usr.bin/bmake/tests/shell/replace/expected.stderr.2 b/usr.bin/bmake/tests/shell/replace/expected.stderr.2 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/usr.bin/bmake/tests/shell/replace/expected.stderr.2 diff --git a/usr.bin/bmake/tests/shell/replace/expected.stdout.1 b/usr.bin/bmake/tests/shell/replace/expected.stdout.1 new file mode 100644 index 000000000000..eff99ea17ab2 --- /dev/null +++ b/usr.bin/bmake/tests/shell/replace/expected.stdout.1 @@ -0,0 +1,3 @@ +-c funny $ +funnier $ +-ec funnier $ diff --git a/usr.bin/bmake/tests/shell/replace/expected.stdout.2 b/usr.bin/bmake/tests/shell/replace/expected.stdout.2 new file mode 100644 index 000000000000..c79a09af2916 --- /dev/null +++ b/usr.bin/bmake/tests/shell/replace/expected.stdout.2 @@ -0,0 +1,6 @@ +-yx +be quiet +ignore errors +funny $ +check errors +funnier $ diff --git a/usr.bin/bmake/tests/shell/replace/legacy_test.sh b/usr.bin/bmake/tests/shell/replace/legacy_test.sh new file mode 100644 index 000000000000..880ca780d53b --- /dev/null +++ b/usr.bin/bmake/tests/shell/replace/legacy_test.sh @@ -0,0 +1,17 @@ +#! /bin/sh +# $FreeBSD$ + +. $(dirname $0)/../../common.sh + +# Description +DESC="Check that the shell can be replaced." + +# Setup +TEST_COPY_FILES="shell 755" + +# Run +TEST_N=2 +TEST_1= +TEST_2=-j2 + +eval_cmd $* diff --git a/usr.bin/bmake/tests/shell/replace/shell b/usr.bin/bmake/tests/shell/replace/shell new file mode 100644 index 000000000000..46169eb6efc2 --- /dev/null +++ b/usr.bin/bmake/tests/shell/replace/shell @@ -0,0 +1,6 @@ +#!/bin/sh +# $FreeBSD$ +echo $@ +if ! test -t 0 ; then + cat +fi |
