diff options
author | valoq <valoq@mailbox.org> | 2016-11-19 22:12:51 +0100 |
---|---|---|
committer | valoq <valoq@mailbox.org> | 2016-11-19 22:12:51 +0100 |
commit | 530db20edeee191a3b60d56b3b87999a3d10979e (patch) | |
tree | 9053d21580917bdf0e6480b2b2875e90b08b1d8c /test/fcopy/cmdline.exp | |
parent | readme updated (diff) | |
parent | qemu profile (diff) | |
download | firejail-530db20edeee191a3b60d56b3b87999a3d10979e.tar.gz firejail-530db20edeee191a3b60d56b3b87999a3d10979e.tar.zst firejail-530db20edeee191a3b60d56b3b87999a3d10979e.zip |
fixed readme
Diffstat (limited to 'test/fcopy/cmdline.exp')
-rwxr-xr-x | test/fcopy/cmdline.exp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/fcopy/cmdline.exp b/test/fcopy/cmdline.exp new file mode 100755 index 000000000..24bb19351 --- /dev/null +++ b/test/fcopy/cmdline.exp | |||
@@ -0,0 +1,46 @@ | |||
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 -- "/usr/lib/firejail/fcopy\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "files missing" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "Usage:" | ||
18 | } | ||
19 | after 100 | ||
20 | |||
21 | send -- "/usr/lib/firejail/fcopy foo\r" | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 2\n";exit} | ||
24 | "files missing" | ||
25 | } | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 3\n";exit} | ||
28 | "Usage:" | ||
29 | } | ||
30 | after 100 | ||
31 | |||
32 | send -- "/usr/lib/firejail/fcopy f%oo1 foo2\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 4\n";exit} | ||
35 | "invalid file name" | ||
36 | } | ||
37 | after 100 | ||
38 | |||
39 | send -- "/usr/lib/firejail/fcopy foo1 f,oo2\r" | ||
40 | expect { | ||
41 | timeout {puts "TESTING ERROR 5\n";exit} | ||
42 | "invalid file name" | ||
43 | } | ||
44 | after 100 | ||
45 | |||
46 | puts "\nall done\n" | ||