mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-16 06:52:27 +00:00
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:
parent
755a1be6d0
commit
a142345641
|
@ -3,4 +3,4 @@
|
||||||
# Precondition
|
# Precondition
|
||||||
(cd /bin) || exit
|
(cd /bin) || exit
|
||||||
# Verify write error is ignored.
|
# Verify write error is ignored.
|
||||||
$SH +m -ic 'CDPATH=/:; cd bin 1</dev/null'
|
ENV= $SH +m -ic 'CDPATH=/:; cd bin 1</dev/null'
|
||||||
|
|
|
@ -8,7 +8,7 @@ T=$(mktemp -d sh-test.XXXXXX)
|
||||||
cd $T
|
cd $T
|
||||||
|
|
||||||
mkfifo input output error
|
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
|
# Syntax error
|
||||||
echo ')' >&3
|
echo ')' >&3
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
! echo echo bad | $SH -ic 'fi' 2>/dev/null
|
! echo echo bad | ENV= $SH -ic 'fi' 2>/dev/null
|
||||||
|
|
Loading…
Reference in a new issue