diff options
author | 2023-01-31 11:15:21 -0500 | |
---|---|---|
committer | 2023-01-31 11:15:21 -0500 | |
commit | 1e6116cf15d03745b2f1d8667b8c06a3fe1cce3d (patch) | |
tree | 3aff0e9f825566778831719ad3a5512279801def /test/sysutils/wget.exp | |
parent | merges (diff) | |
download | firejail-1e6116cf15d03745b2f1d8667b8c06a3fe1cce3d.tar.gz firejail-1e6116cf15d03745b2f1d8667b8c06a3fe1cce3d.tar.zst firejail-1e6116cf15d03745b2f1d8667b8c06a3fe1cce3d.zip |
testing sysutils
Diffstat (limited to 'test/sysutils/wget.exp')
-rwxr-xr-x | test/sysutils/wget.exp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/sysutils/wget.exp b/test/sysutils/wget.exp new file mode 100755 index 000000000..c6d2765c7 --- /dev/null +++ b/test/sysutils/wget.exp | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2022 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "rm index.html*\r" | ||
11 | after 500 | ||
12 | |||
13 | send -- "firejail --ignore=quiet wget -q debian.org\r" | ||
14 | expect { | ||
15 | timeout {puts "TESTING ERROR 1\n";exit} | ||
16 | "Child process initialized" | ||
17 | } | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 2\n";exit} | ||
20 | "Parent is shutting down" | ||
21 | } | ||
22 | after 100 | ||
23 | |||
24 | send -- "ls -l index.html\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 3\n";exit} | ||
27 | "No such file or directory" {puts "TESTING ERROR 4\n";exit} | ||
28 | "rw" | ||
29 | } | ||
30 | after 100 | ||
31 | send -- "rm index.html*\r" | ||
32 | after 500 | ||
33 | |||
34 | puts "\nall done\n" | ||