summaryrefslogtreecommitdiff
path: root/test.d/libproxy_test_envvar.test
blob: 9284b918b7fc875aaf95265438a11fd8735752a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# $Id$

result_ok="http://proxy:1234"
testurl="http://www.google.com"
proxy_bin="$( test -x src/bin/proxy && echo src/bin/proxy || which proxy)"

if [ -x $proxy_bin ]; then
    result=$(PX_CONFIG_ORDER=config_envvar http_proxy="http://proxy:1234" $proxy_bin $testurl)
else
    result="N/A"
fi

echo 'name="test_env_var1"'
if [ "$result" = "$result_ok" ]; then
  echo pass=True
else
  echo pass=False
  echo "reason='$proxy_bin returned $result instead of $result_ok'"
fi