]> andersk Git - openssh.git/blame - regress/envpass.sh
- (dtucker) [regress/multiplex.sh] Skip test on platforms that do not
[openssh.git] / regress / envpass.sh
CommitLineData
e0e1d130 1# $OpenBSD: envpass.sh,v 1.3 2004/06/22 22:42:02 dtucker Exp $
30ee6294 2# Placed in the Public Domain.
3
4tid="environment passing"
5
6# NB accepted env vars are in test-exec.sh (_XXX_TEST_* and _XXX_TEST)
7
8trace "pass env, don't accept"
9verbose "test $tid: pass env, don't accept"
10_TEST_ENV=blah ${SSH} -oSendEnv="*" -F $OBJ/ssh_proxy otherhost \
cb19b709 11 sh << 'EOF'
e0e1d130 12 test -z "$_TEST_ENV"
cb19b709 13EOF
30ee6294 14r=$?
15if [ $r -ne 0 ]; then
16 fail "environment found"
17fi
18
19trace "don't pass env, accept"
20verbose "test $tid: don't pass env, accept"
21${SSH} -F $OBJ/ssh_proxy otherhost \
cb19b709 22 sh << 'EOF'
e0e1d130 23 test -z "$_XXX_TEST_A" && test -z "$_XXX_TEST_B"
cb19b709 24EOF
30ee6294 25r=$?
26if [ $r -ne 0 ]; then
27 fail "environment found"
28fi
29
30trace "pass single env, accept single env"
31verbose "test $tid: pass single env, accept single env"
32_XXX_TEST=blah ${SSH} -oSendEnv="_XXX_TEST" -F $OBJ/ssh_proxy otherhost \
cb19b709 33 sh << 'EOF'
34 test X"$_XXX_TEST" = X"blah"
35EOF
30ee6294 36r=$?
37if [ $r -ne 0 ]; then
38 fail "environment not found"
39fi
40
41trace "pass multiple env, accept multiple env"
42verbose "test $tid: pass multiple env, accept multiple env"
43_XXX_TEST_A=1 _XXX_TEST_B=2 ${SSH} -oSendEnv="_XXX_TEST_*" \
44 -F $OBJ/ssh_proxy otherhost \
cb19b709 45 sh << 'EOF'
46 test X"$_XXX_TEST_A" = X"1" -a X"$_XXX_TEST_B" = X"2"
47EOF
30ee6294 48r=$?
49if [ $r -ne 0 ]; then
50 fail "environment not found"
51fi
This page took 0.91795 seconds and 5 git commands to generate.