diff options
Diffstat (limited to 'test/utils/command.exp')
-rwxr-xr-x | test/utils/command.exp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/utils/command.exp b/test/utils/command.exp new file mode 100755 index 000000000..3b18540db --- /dev/null +++ b/test/utils/command.exp | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2018 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --quiet --private-etc=passwd,group -c ls -al /etc\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "cron" {puts "TESTING ERROR 2\n";exit} | ||
14 | "group" | ||
15 | } | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 3\n";exit} | ||
18 | "passwd" | ||
19 | } | ||
20 | |||
21 | |||
22 | after 100 | ||
23 | puts "\nall done\n" | ||