diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/sysutils/less.exp | 20 | ||||
-rwxr-xr-x | test/sysutils/man.exp | 13 | ||||
-rwxr-xr-x | test/sysutils/sysutils.sh | 8 | ||||
-rwxr-xr-x | test/sysutils/xzdec.exp | 29 |
4 files changed, 21 insertions, 49 deletions
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 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "firejail less sysutils.sh\r" | 10 | send -- "rm -f /tmp/tt\r" |
11 | after 500 | ||
12 | |||
13 | send -- "firejail less sysutils.sh > /tmp/t\r" | ||
14 | sleep 1 | ||
15 | |||
16 | send -- "cat /tmp/t | grep Authors\r" | ||
11 | expect { | 17 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 18 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "(press RETURN)" {puts "TESTING SKIP: terminal is not fully functional - 1.1\n";exit} | ||
14 | "Press RETURN to continue" {puts "TESTING SKIP: terminal is not fully functional - 1.2\n";exit} | ||
15 | "Firejail Authors" | 19 | "Firejail Authors" |
16 | } | 20 | } |
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 2\n";exit} | ||
19 | "MALLOC_CHECK" | ||
20 | } | ||
21 | |||
22 | after 100 | 21 | after 100 |
22 | |||
23 | send -- "rm -f /tmp/t\r" | ||
24 | after 500 | ||
23 | puts "\nall done\n" | 25 | 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 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "firejail man firejail\r" | 10 | send -- "rm -f /tmp/t\r" |
11 | after 500 | ||
12 | |||
13 | send -- "firejail man firejail > /tmp/t\r" | ||
14 | sleep 1 | ||
15 | |||
16 | send -- "cat /tmp/t\r" | ||
11 | expect { | 17 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 18 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "(press RETURN)" {puts "TESTING SKIP: terminal is not fully functional - 1.1\n";exit} | ||
14 | "Press RETURN to continue" {puts "TESTING SKIP: terminal is not fully functional - 1.2\n";exit} | ||
15 | "NAME" | 19 | "NAME" |
16 | } | 20 | } |
17 | after 100 | 21 | after 100 |
22 | |||
23 | send -- "rm -f /tmp/t\r" | ||
24 | after 500 | ||
18 | puts "\nall done\n" | 25 | puts "\nall done\n" |
diff --git a/test/sysutils/sysutils.sh b/test/sysutils/sysutils.sh index 94f0b1f76..f5567ff02 100755 --- a/test/sysutils/sysutils.sh +++ b/test/sysutils/sysutils.sh | |||
@@ -47,14 +47,6 @@ else | |||
47 | echo "TESTING SKIP: gzip not found" | 47 | echo "TESTING SKIP: gzip not found" |
48 | fi | 48 | fi |
49 | 49 | ||
50 | if command -v xzdec | ||
51 | then | ||
52 | echo "TESTING: xzdec" | ||
53 | ./xzdec.exp | ||
54 | else | ||
55 | echo "TESTING SKIP: xzdec not found" | ||
56 | fi | ||
57 | |||
58 | if command -v xz | 50 | if command -v xz |
59 | then | 51 | then |
60 | echo "TESTING: xz" | 52 | 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 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "/usr/bin/xz -c /usr/bin/firejail > firejail_t3\r" | ||
11 | sleep 1 | ||
12 | |||
13 | send -- "/usr/bin/xzdec -c firejail_t3 > firejail_t1\r" | ||
14 | sleep 1 | ||
15 | |||
16 | send -- "firejail /usr/bin/xzdec -c firejail_t3 > firejail_t2\r" | ||
17 | sleep 1 | ||
18 | |||
19 | send -- "diff -s firejail_t1 firejail_t2\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "firejail_t1 and firejail_t2 are identical" | ||
23 | } | ||
24 | |||
25 | send -- "rm firejail_t*\r" | ||
26 | sleep 1 | ||
27 | |||
28 | |||
29 | puts "\nall done\n" | ||