aboutsummaryrefslogtreecommitdiffstats
path: root/test/doubledash.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/doubledash.exp')
-rwxr-xr-xtest/doubledash.exp60
1 files changed, 60 insertions, 0 deletions
diff --git a/test/doubledash.exp b/test/doubledash.exp
new file mode 100755
index 000000000..3c8a42471
--- /dev/null
+++ b/test/doubledash.exp
@@ -0,0 +1,60 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail -- ls -- -testdir\r"
8expect {
9 timeout {puts "TESTING ERROR 1\n";exit}
10 "Child process initialized"
11}
12expect {
13 timeout {puts "TESTING ERROR 2\n";exit}
14 "ttt"
15}
16expect {
17 timeout {puts "TESTING ERROR 3\n";exit}
18 "parent is shutting down"
19}
20sleep 1
21
22
23send -- "firejail --name=testing -- -testdir/bash\r"
24expect {
25 timeout {puts "TESTING ERROR 4\n";exit}
26 "Child process initialized"
27}
28sleep 3
29
30spawn $env(SHELL)
31send -- "firejail --join=testing -- -testdir/bash\r"
32expect {
33 timeout {puts "TESTING ERROR 5\n";exit}
34 "the first child process inside the sandbox"
35}
36sleep 3
37
38spawn $env(SHELL)
39send -- "firejail --list;pwd\r"
40expect {
41 timeout {puts "TESTING ERROR 6\n";exit}
42 "name=testing"
43}
44expect {
45 timeout {puts "TESTING ERROR 7\n";exit}
46 "home"
47}
48send -- "firejail --list;pwd\r"
49expect {
50 timeout {puts "TESTING ERROR 8 (join)\n";exit}
51 "join=testing"
52}
53expect {
54 timeout {puts "TESTING ERROR 9\n";exit}
55 "home"
56}
57
58sleep 1
59
60puts "\n"