diff options
Diffstat (limited to 'test/sysutils/tar.exp')
-rwxr-xr-x | test/sysutils/tar.exp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/sysutils/tar.exp b/test/sysutils/tar.exp new file mode 100755 index 000000000..af569f5ac --- /dev/null +++ b/test/sysutils/tar.exp | |||
@@ -0,0 +1,35 @@ | |||
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 /bin/tar -cjvf firejail_t2 /usr/share/doc/firejail\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "/usr/share/doc/firejail/README" | ||
14 | } | ||
15 | after 100 | ||
16 | |||
17 | send -- "firejail /bin/tar --compare --file=firejail_t2 -C / | wc\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 2\n";exit} | ||
20 | " 0 0 0" | ||
21 | } | ||
22 | sleep 1 | ||
23 | send -- "/bin/tar --compare --file=firejail_t2 -C / | wc\r" | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 3\n";exit} | ||
26 | " 0 0 0" | ||
27 | } | ||
28 | sleep 1 | ||
29 | |||
30 | |||
31 | send -- "rm firejail_t*\r" | ||
32 | sleep 1 | ||
33 | |||
34 | |||
35 | puts "\nall done\n" | ||