aboutsummaryrefslogtreecommitdiffstats
path: root/test/environment/hostfile.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/environment/hostfile.exp')
-rwxr-xr-xtest/environment/hostfile.exp32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/environment/hostfile.exp b/test/environment/hostfile.exp
new file mode 100755
index 000000000..06003f744
--- /dev/null
+++ b/test/environment/hostfile.exp
@@ -0,0 +1,32 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2017 Firejail Authors
4# License GPL v2
5
6
7set timeout 10
8spawn $env(SHELL)
9match_max 100000
10
11send -- "firejail --debug --hosts-file=hostfile\r"
12expect {
13 timeout {puts "TESTING ERROR 1\n";exit}
14 "Loading user hosts file"
15}
16expect {
17 timeout {puts "TESTING ERROR 2\n";exit}
18 "Child process initialized"
19}
20after 100
21
22send -- "cat /etc/hosts\r"
23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 "hostfile test"
26}
27
28send -- "exit\r"
29after 100
30
31puts "\nall done\n"
32