~ubuntu-branches/ubuntu/oneiric/libproxy/oneiric-security

« back to all changes in this revision

Viewing changes to test.d/.svn/text-base/libproxy_test_pac_file.test.svn-base

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-04-13 16:08:18 UTC
  • mfrom: (1.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100413160818-ehegim3im5iowd2j
Tags: 0.3.1-1ubuntu1
Resync on the Debian testing version for lucid but built it using webkit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# $Id: libproxy_test_envvar.test 298 2008-12-17 05:34:50Z dominique.leuenberger $
 
3
 
 
4
result1_ok="http://1.2.3.4:1234"
 
5
result2_ok="direct://"
 
6
testurl1="http://code.google.com"
 
7
testurl2="http://www.google.com"
 
8
proxy_bin="$( test -x src/bin/proxy && echo src/bin/proxy || which proxy)"
 
9
pac_url="file://$(pwd)/test.d/libproxy_test_pac_file.test.pac"
 
10
 
 
11
if [ -x $proxy_bin ]; then
 
12
    result1=$(PX_CONFIG_ORDER=config_envvar http_proxy="pac+$pac_url" $proxy_bin $testurl1)
 
13
    result2=$(PX_CONFIG_ORDER=config_envvar http_proxy="pac+$pac_url" $proxy_bin $testurl2)
 
14
else
 
15
    result="N/A"
 
16
fi
 
17
 
 
18
echo 'name="test_pac_file"'
 
19
if [ "$result1" = "$result1_ok" -a "$result2" = "$result2_ok" ]; then
 
20
  echo pass=True
 
21
else
 
22
  echo pass=False
 
23
  echo "reason='$proxy_bin returned $result1 and $result2 instead of $result1_ok and $result2_ok'"
 
24
fi