From 2531759b80fbfcfbe296bd4bab329c61b7757c92 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Fri, 24 Feb 2023 20:37:35 -0500 Subject: more private-etc --- test/sysutils/less.exp | 20 +++++++++++--------- test/sysutils/man.exp | 13 ++++++++++--- test/sysutils/sysutils.sh | 8 -------- test/sysutils/xzdec.exp | 29 ----------------------------- 4 files changed, 21 insertions(+), 49 deletions(-) delete mode 100755 test/sysutils/xzdec.exp (limited to 'test') diff --git a/test/sysutils/less.exp b/test/sysutils/less.exp index 9e19af83a..182e259e1 100755 --- a/test/sysutils/less.exp +++ b/test/sysutils/less.exp @@ -7,17 +7,19 @@ set timeout 10 spawn $env(SHELL) match_max 100000 -send -- "firejail less sysutils.sh\r" +send -- "rm -f /tmp/tt\r" +after 500 + +send -- "firejail less sysutils.sh > /tmp/t\r" +sleep 1 + +send -- "cat /tmp/t | grep Authors\r" expect { - timeout {puts "TESTING ERROR 1\n";exit} - "(press RETURN)" {puts "TESTING SKIP: terminal is not fully functional - 1.1\n";exit} - "Press RETURN to continue" {puts "TESTING SKIP: terminal is not fully functional - 1.2\n";exit} + timeout {puts "TESTING ERROR 0\n";exit} "Firejail Authors" } -expect { - timeout {puts "TESTING ERROR 2\n";exit} - "MALLOC_CHECK" -} - after 100 + +send -- "rm -f /tmp/t\r" +after 500 puts "\nall done\n" diff --git a/test/sysutils/man.exp b/test/sysutils/man.exp index f4fc5aa2c..0386b2e92 100755 --- a/test/sysutils/man.exp +++ b/test/sysutils/man.exp @@ -7,12 +7,19 @@ set timeout 10 spawn $env(SHELL) match_max 100000 -send -- "firejail man firejail\r" +send -- "rm -f /tmp/t\r" +after 500 + +send -- "firejail man firejail > /tmp/t\r" +sleep 1 + +send -- "cat /tmp/t\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "(press RETURN)" {puts "TESTING SKIP: terminal is not fully functional - 1.1\n";exit} - "Press RETURN to continue" {puts "TESTING SKIP: terminal is not fully functional - 1.2\n";exit} "NAME" } after 100 + +send -- "rm -f /tmp/t\r" +after 500 puts "\nall done\n" diff --git a/test/sysutils/sysutils.sh b/test/sysutils/sysutils.sh index 34acca07d..231f5afa8 100755 --- a/test/sysutils/sysutils.sh +++ b/test/sysutils/sysutils.sh @@ -47,14 +47,6 @@ else echo "TESTING SKIP: gzip not found" fi -if command -v xzdec -then - echo "TESTING: xzdec" - ./xzdec.exp -else - echo "TESTING SKIP: xzdec not found" -fi - if command -v xz then echo "TESTING: xz" diff --git a/test/sysutils/xzdec.exp b/test/sysutils/xzdec.exp deleted file mode 100755 index 62cc1c225..000000000 --- a/test/sysutils/xzdec.exp +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2023 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "/usr/bin/xz -c /usr/bin/firejail > firejail_t3\r" -sleep 1 - -send -- "/usr/bin/xzdec -c firejail_t3 > firejail_t1\r" -sleep 1 - -send -- "firejail /usr/bin/xzdec -c firejail_t3 > firejail_t2\r" -sleep 1 - -send -- "diff -s firejail_t1 firejail_t2\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "firejail_t1 and firejail_t2 are identical" -} - -send -- "rm firejail_t*\r" -sleep 1 - - -puts "\nall done\n" -- cgit v1.2.3-54-g00ecf