]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/builtins/dot1.0
shell_cmds-216.60.1.tar.gz
[apple/shell_cmds.git] / sh / tests / builtins / dot1.0
CommitLineData
deb63bfb 1# $FreeBSD: head/bin/sh/tests/builtins/dot1.0 208629 2010-05-28 22:08:34Z jilles $
71aad674
A
2
3failures=
4failure() {
5 echo "Error at line $1" >&2
6 failures=x$failures
7}
8
9T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) || exit
10trap 'rm -rf $T' 0
11cd $T || exit 3
12unset x
13echo 'x=2' >testscript
14. ./testscript
15[ "$x" = 2 ] || failure $LINENO
16cd / || exit 3
17x=1
18PATH=$T:$PATH . testscript
19[ "$x" = 2 ] || failure $LINENO
20
21test -z "$failures"