Debian Codegraph @

debian/tests/gsettings

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # Copyright 2020 Simon McVittie
3 # SPDX-License-Identifier: LGPL-2.1+
4
5 set -eux
6 set -o pipefail
7
8 #export PX_DEBUG=1
9
10 resetscip-shell shell libproxy 0.5.12-1 reset(). () {
11 unset XDG_CURRENT_DESKTOP
12 unset FTP_PROXY
13 unset GSETTINGS_BACKEND
14 unset HTTPS_PROXY
15 unset HTTP_PROXY
16 unset KDE_FULL_SESSION
17 unset NO_PROXY
18 unset ftp_proxy
19 unset http_proxy
20 unset https_proxy
21 unset no_proxy
22 }
23
24 resetscip-shell shell libproxy 0.5.12-1 reset().
25 export XDG_CURRENT_DESKTOP=GNOME
26 export GSETTINGS_BACKEND=keyfile
27 export XDG_CONFIG_HOME="$AUTOPKGTEST_TMP/config"
28 mkdirscip-shell system . . mkdir. -p "$XDG_CONFIG_HOME/glib-2.0/settings"
29 catscip-shell system . . cat. > "$XDG_CONFIG_HOME/glib-2.0/settings/keyfile" <<'EOF'
30 [system/proxy]
31 autoconfig-url=''
32 ignore-hosts=['localhost']
33 mode='manual'
34 use-same-proxy=false
35
36 [system/proxy/ftp]
37 host='ftpproxy.example.net'
38 port=8000
39
40 [system/proxy/http]
41 host='proxy.example.net'
42 port=8000
43
44 [system/proxy/https]
45 host='sslproxy.example.net'
46 port=8000
47
48 [system/proxy/socks]
49 host='socksproxy.example.net'
50 port=8000
51 EOF
52
53 answer="$(proxy http://example.com)"
54 testscip-shell system . . test. "${answer}" = "http://proxy.example.net:8000"
55
56 answer="$(proxy https://example.com)"
57 testscip-shell system . . test. "${answer}" = "http://sslproxy.example.net:8000"
58
59 answer="$(proxy ftp://ftp.example.com)"
60 testscip-shell system . . test. "${answer}" = "http://ftpproxy.example.net:8000"
61
62 answer="$(proxy http://localhost)"
63 testscip-shell system . . test. "${answer}" = direct://