summaryrefslogtreecommitdiff
path: root/test.d/libproxy_test_pacrunner_mozjs_syntaxerror.test
diff options
context:
space:
mode:
Diffstat (limited to 'test.d/libproxy_test_pacrunner_mozjs_syntaxerror.test')
-rwxr-xr-xtest.d/libproxy_test_pacrunner_mozjs_syntaxerror.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/test.d/libproxy_test_pacrunner_mozjs_syntaxerror.test b/test.d/libproxy_test_pacrunner_mozjs_syntaxerror.test
new file mode 100755
index 0000000..e64afc6
--- /dev/null
+++ b/test.d/libproxy_test_pacrunner_mozjs_syntaxerror.test
@@ -0,0 +1,24 @@
+#!/bin/sh
+# $Id: libproxy_test_envvar.test 298 2008-12-17 05:34:50Z dominique.leuenberger $
+
+result1_ok="direct://"
+result2_ok="direct://"
+testurl1="http://code.google.com"
+testurl2="http://www.google.com"
+proxy_bin="$( test -x src/bin/proxy && echo src/bin/proxy || which proxy)"
+pac_url="file://$(pwd)/test.d/libproxy_test_pac_file_syntaxerror.test.pac"
+
+if [ -x $proxy_bin ]; then
+ result1=$(PX_CONFIG_ORDER=config_envvar PX_MODULE_BLACKLIST="pacrunner_*" PX_MODULE_WHITELIST="pacrunner_mozjs" http_proxy="pac+$pac_url" $proxy_bin $testurl1)
+ result2=$(PX_CONFIG_ORDER=config_envvar PX_MODULE_BLACKLIST="pacrunner_*" PX_MODULE_WHITELIST="pacrunner_mozjs" http_proxy="pac+$pac_url" $proxy_bin $testurl2)
+else
+ result="N/A"
+fi
+
+echo 'name="test_pacrunner_mozjs_syntaxerror:"'
+if [ "$result1" = "$result1_ok" -a "$result2" = "$result2_ok" ]; then
+ echo pass=True
+else
+ echo pass=False
+ echo "reason='$proxy_bin returned $result1 and $result2 instead of $result1_ok and $result2_ok'"
+fi