aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs/whitelist-whitespace.exp
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2019-09-24 13:42:19 +0200
committerLibravatar smitsohu <smitsohu@gmail.com>2019-09-24 13:42:19 +0200
commit5bb476f74efb4754b6f5f8d711c6b77898ef9385 (patch)
treeb90acab8efa0b202f0416d87c68caaabaf0f6ee9 /test/fs/whitelist-whitespace.exp
parentMerge branch 'master' of https://github.com/netblue30/firejail (diff)
downloadfirejail-5bb476f74efb4754b6f5f8d711c6b77898ef9385.tar.gz
firejail-5bb476f74efb4754b6f5f8d711c6b77898ef9385.tar.zst
firejail-5bb476f74efb4754b6f5f8d711c6b77898ef9385.zip
testing
Diffstat (limited to 'test/fs/whitelist-whitespace.exp')
-rwxr-xr-xtest/fs/whitelist-whitespace.exp41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/fs/whitelist-whitespace.exp b/test/fs/whitelist-whitespace.exp
new file mode 100755
index 000000000..b16668557
--- /dev/null
+++ b/test/fs/whitelist-whitespace.exp
@@ -0,0 +1,41 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "touch ~/filewith\\\ \\\ many\\\ whitespaces\\\ \r"
8after 100
9
10send -- "firejail --noprofile --whitelist=~/filewith\\\ \\\ many\\\ whitespaces\\\ \r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 "Child process initialized"
14}
15sleep 1
16
17send -- "ls ~ | wc -l\r"
18expect {
19 timeout {puts "TESTING ERROR 2\n";exit}
20 "\n1"
21}
22after 100
23
24send -- "ls ~\r"
25expect {
26 timeout {puts "TESTING ERROR 3\n";exit}
27 "filewith many whitespaces "
28}
29after 100
30
31send -- "exit\r"
32sleep 1
33
34send -- "rm -v ~/filewith\\\ \\\ many\\\ whitespaces\\\ \r"
35expect {
36 timeout {puts "TESTING ERROR 4\n";exit}
37 "removed"
38}
39after 100
40
41puts "\nall done\n"