diff options
Diffstat (limited to 'test/fs/whitelist-whitespace.exp')
-rwxr-xr-x | test/fs/whitelist-whitespace.exp | 41 |
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 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "touch ~/filewith\\\ \\\ many\\\ whitespaces\\\ \r" | ||
8 | after 100 | ||
9 | |||
10 | send -- "firejail --noprofile --whitelist=~/filewith\\\ \\\ many\\\ whitespaces\\\ \r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 1 | ||
16 | |||
17 | send -- "ls ~ | wc -l\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 2\n";exit} | ||
20 | "\n1" | ||
21 | } | ||
22 | after 100 | ||
23 | |||
24 | send -- "ls ~\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 3\n";exit} | ||
27 | "filewith many whitespaces " | ||
28 | } | ||
29 | after 100 | ||
30 | |||
31 | send -- "exit\r" | ||
32 | sleep 1 | ||
33 | |||
34 | send -- "rm -v ~/filewith\\\ \\\ many\\\ whitespaces\\\ \r" | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 4\n";exit} | ||
37 | "removed" | ||
38 | } | ||
39 | after 100 | ||
40 | |||
41 | puts "\nall done\n" | ||