diff options
Diffstat (limited to 'regress/envpass.sh')
-rw-r--r-- | regress/envpass.sh | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/regress/envpass.sh b/regress/envpass.sh index 67044d421..a5bae06dd 100644 --- a/regress/envpass.sh +++ b/regress/envpass.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: envpass.sh,v 1.1 2004/04/27 09:47:30 djm Exp $ | 1 | # $OpenBSD: envpass.sh,v 1.2 2004/06/22 03:12:13 markus Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | tid="environment passing" | 4 | tid="environment passing" |
@@ -8,7 +8,9 @@ tid="environment passing" | |||
8 | trace "pass env, don't accept" | 8 | trace "pass env, don't accept" |
9 | verbose "test $tid: pass env, don't accept" | 9 | verbose "test $tid: pass env, don't accept" |
10 | _TEST_ENV=blah ${SSH} -oSendEnv="*" -F $OBJ/ssh_proxy otherhost \ | 10 | _TEST_ENV=blah ${SSH} -oSendEnv="*" -F $OBJ/ssh_proxy otherhost \ |
11 | '[ -z "$_TEST_ENV" ]' | 11 | sh << 'EOF' |
12 | test -z $_TEST_ENV | ||
13 | EOF | ||
12 | r=$? | 14 | r=$? |
13 | if [ $r -ne 0 ]; then | 15 | if [ $r -ne 0 ]; then |
14 | fail "environment found" | 16 | fail "environment found" |
@@ -17,7 +19,9 @@ fi | |||
17 | trace "don't pass env, accept" | 19 | trace "don't pass env, accept" |
18 | verbose "test $tid: don't pass env, accept" | 20 | verbose "test $tid: don't pass env, accept" |
19 | ${SSH} -F $OBJ/ssh_proxy otherhost \ | 21 | ${SSH} -F $OBJ/ssh_proxy otherhost \ |
20 | '[ -z "$_XXX_TEST_A" -a -z "$_XXX_TEST_B" ]' | 22 | sh << 'EOF' |
23 | test -z $_XXX_TEST_A && test -z $_XXX_TEST_B | ||
24 | EOF | ||
21 | r=$? | 25 | r=$? |
22 | if [ $r -ne 0 ]; then | 26 | if [ $r -ne 0 ]; then |
23 | fail "environment found" | 27 | fail "environment found" |
@@ -26,7 +30,9 @@ fi | |||
26 | trace "pass single env, accept single env" | 30 | trace "pass single env, accept single env" |
27 | verbose "test $tid: pass single env, accept single env" | 31 | verbose "test $tid: pass single env, accept single env" |
28 | _XXX_TEST=blah ${SSH} -oSendEnv="_XXX_TEST" -F $OBJ/ssh_proxy otherhost \ | 32 | _XXX_TEST=blah ${SSH} -oSendEnv="_XXX_TEST" -F $OBJ/ssh_proxy otherhost \ |
29 | '[ "x$_XXX_TEST" = "xblah" ]' | 33 | sh << 'EOF' |
34 | test X"$_XXX_TEST" = X"blah" | ||
35 | EOF | ||
30 | r=$? | 36 | r=$? |
31 | if [ $r -ne 0 ]; then | 37 | if [ $r -ne 0 ]; then |
32 | fail "environment not found" | 38 | fail "environment not found" |
@@ -36,9 +42,10 @@ trace "pass multiple env, accept multiple env" | |||
36 | verbose "test $tid: pass multiple env, accept multiple env" | 42 | verbose "test $tid: pass multiple env, accept multiple env" |
37 | _XXX_TEST_A=1 _XXX_TEST_B=2 ${SSH} -oSendEnv="_XXX_TEST_*" \ | 43 | _XXX_TEST_A=1 _XXX_TEST_B=2 ${SSH} -oSendEnv="_XXX_TEST_*" \ |
38 | -F $OBJ/ssh_proxy otherhost \ | 44 | -F $OBJ/ssh_proxy otherhost \ |
39 | '[ "x$_XXX_TEST_A" = "x1" -a "x$_XXX_TEST_B" = "x2" ]' | 45 | sh << 'EOF' |
46 | test X"$_XXX_TEST_A" = X"1" -a X"$_XXX_TEST_B" = X"2" | ||
47 | EOF | ||
40 | r=$? | 48 | r=$? |
41 | if [ $r -ne 0 ]; then | 49 | if [ $r -ne 0 ]; then |
42 | fail "environment not found" | 50 | fail "environment not found" |
43 | fi | 51 | fi |
44 | |||