sh: nullify ENV in tests

This is to avoid loading .shrc which may contain commands that would
result in output different than expected.

Reviewed by:	jilles
Differential Revision:	https://reviews.freebsd.org/D35876
This commit is contained in:
Piotr Pawel Stefaniak 2022-08-20 12:16:18 +02:00
parent 755a1be6d0
commit a142345641
3 changed files with 3 additions and 3 deletions

View File

@ -3,4 +3,4 @@
# Precondition
(cd /bin) || exit
# Verify write error is ignored.
$SH +m -ic 'CDPATH=/:; cd bin 1</dev/null'
ENV= $SH +m -ic 'CDPATH=/:; cd bin 1</dev/null'

View File

@ -8,7 +8,7 @@ T=$(mktemp -d sh-test.XXXXXX)
cd $T
mkfifo input output error
HISTFILE=/dev/null ${SH} +m -i <input >output 2>error &
ENV= HISTFILE=/dev/null ${SH} +m -i <input >output 2>error &
{
# Syntax error
echo ')' >&3

View File

@ -1,3 +1,3 @@
# $FreeBSD$
! echo echo bad | $SH -ic 'fi' 2>/dev/null
! echo echo bad | ENV= $SH -ic 'fi' 2>/dev/null