aboutsummaryrefslogtreecommitdiffstats
path: root/test/sysutils/curl.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/sysutils/curl.exp')
-rwxr-xr-xtest/sysutils/curl.exp34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/sysutils/curl.exp b/test/sysutils/curl.exp
new file mode 100755
index 000000000..29c9883a4
--- /dev/null
+++ b/test/sysutils/curl.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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "rm index.html*\r"
11after 500
12
13send -- "firejail --ignore=quiet curl -s -o index.html debian.org\r"
14expect {
15 timeout {puts "TESTING ERROR 1\n";exit}
16 "Child process initialized"
17}
18expect {
19 timeout {puts "TESTING ERROR 2\n";exit}
20 "Parent is shutting down"
21}
22after 100
23
24send -- "ls -l index.html\r"
25expect {
26 timeout {puts "TESTING ERROR 3\n";exit}
27 "No such file or directory" {puts "TESTING ERROR 4\n";exit}
28 "rw"
29}
30after 100
31send -- "rm index.html*\r"
32after 500
33
34puts "\nall done\n"