diff options
Diffstat (limited to 'test/profiles/test-profile.exp')
-rwxr-xr-x | test/profiles/test-profile.exp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/profiles/test-profile.exp b/test/profiles/test-profile.exp new file mode 100755 index 000000000..590b42652 --- /dev/null +++ b/test/profiles/test-profile.exp | |||
@@ -0,0 +1,23 @@ | |||
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 | if { $argc != 1 } { | ||
11 | puts "TESTING ERROR: argument missing" | ||
12 | puts "Usage: test-profile.exp profile_name" | ||
13 | exit | ||
14 | } | ||
15 | |||
16 | send -- "firejail --profile=$argv /bin/bash\r" | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 0\n";exit} | ||
19 | "Child process initialized" | ||
20 | } | ||
21 | send -- "exit\r" | ||
22 | after 100 | ||
23 | puts "\n" | ||