From 1e6116cf15d03745b2f1d8667b8c06a3fe1cce3d Mon Sep 17 00:00:00 2001 From: netblue30 Date: Tue, 31 Jan 2023 11:15:21 -0500 Subject: testing sysutils --- test/sysutils/wget.exp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 test/sysutils/wget.exp (limited to 'test/sysutils/wget.exp') 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 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2022 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "rm index.html*\r" +after 500 + +send -- "firejail --ignore=quiet wget -q debian.org\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "Parent is shutting down" +} +after 100 + +send -- "ls -l index.html\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "No such file or directory" {puts "TESTING ERROR 4\n";exit} + "rw" +} +after 100 +send -- "rm index.html*\r" +after 500 + +puts "\nall done\n" -- cgit v1.2.3-54-g00ecf