diff options
author | netblue30 <netblue30@yahoo.com> | 2016-04-24 06:32:15 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-04-24 06:32:15 -0400 |
commit | 020c5449036c461ea1829e854da43429322059d6 (patch) | |
tree | 46ca4f358fcc1c50be77586ccdb0e02170d81e1d /test/environment/shell-none.exp | |
parent | testing (diff) | |
download | firejail-020c5449036c461ea1829e854da43429322059d6.tar.gz firejail-020c5449036c461ea1829e854da43429322059d6.tar.zst firejail-020c5449036c461ea1829e854da43429322059d6.zip |
testing
Diffstat (limited to 'test/environment/shell-none.exp')
-rwxr-xr-x | test/environment/shell-none.exp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/environment/shell-none.exp b/test/environment/shell-none.exp new file mode 100755 index 000000000..e30008f83 --- /dev/null +++ b/test/environment/shell-none.exp | |||
@@ -0,0 +1,48 @@ | |||
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --shell=none\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "shell=none configured, but no program specified" | ||
14 | } | ||
15 | sleep 1 | ||
16 | |||
17 | send -- "firejail --profile=shell-none.profile\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 1\n";exit} | ||
20 | "shell=none configured, but no program specified" | ||
21 | } | ||
22 | sleep 1 | ||
23 | |||
24 | send -- "firejail --shell=none ls\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 2\n";exit} | ||
27 | "Child process initialized" | ||
28 | } | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 3\n";exit} | ||
31 | "environment.sh" | ||
32 | } | ||
33 | sleep 1 | ||
34 | |||
35 | send -- "firejail --profile=shell-none.profile ls\r" | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 4\n";exit} | ||
38 | "Child process initialized" | ||
39 | } | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 5\n";exit} | ||
42 | "environment.sh" | ||
43 | } | ||
44 | sleep 1 | ||
45 | |||
46 | |||
47 | puts "\nall done\n" | ||
48 | |||