aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/dns-print.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils/dns-print.exp')
-rwxr-xr-xtest/utils/dns-print.exp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/utils/dns-print.exp b/test/utils/dns-print.exp
new file mode 100755
index 000000000..51dcab508
--- /dev/null
+++ b/test/utils/dns-print.exp
@@ -0,0 +1,24 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=test --dns=1.2.3.4\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15sleep 2
16
17spawn $env(SHELL)
18send -- "firejail --dns.print=test\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 "nameserver 1.2.3.4"
22}
23sleep 1
24puts "\nall done\n"