File: libproxy_test_nomodule_directfallback.test

package info (click to toggle)
libproxy 0.3.1-2%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,212 kB
  • ctags: 455
  • sloc: sh: 10,487; ansic: 2,826; makefile: 185; cpp: 88; python: 24
file content (20 lines) | stat: -rwxr-xr-x 587 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
# $Id: libproxy_test_envvar.test 386 2009-06-07 20:15:13Z dominique.leuenberger $

result_ok="direct://"
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_MODULE_BLACKLIST="*" PX_CONFIG_ORDER=config_envvar http_proxy="http://proxy:1234" $proxy_bin $testurl)
else
    result="N/A"
fi

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