diff options
Diffstat (limited to 'test/sysutils/dig.exp')
-rwxr-xr-x | test/sysutils/dig.exp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/sysutils/dig.exp b/test/sysutils/dig.exp new file mode 100755 index 000000000..bd5ccbb5c --- /dev/null +++ b/test/sysutils/dig.exp | |||
@@ -0,0 +1,18 @@ | |||
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 -- "firejail dig +timeout=1 +retry=0 dns.quad9.net\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "no servers could be reached" {puts "no network connectivity!\n";exit} | ||
14 | "NXDOMAIN" {puts "not found\n";exit} | ||
15 | "ANSWER SECTION" | ||
16 | } | ||
17 | after 100 | ||
18 | puts "\nall done\n" | ||