aboutsummaryrefslogtreecommitdiffstats
path: root/test/sysutils
diff options
context:
space:
mode:
Diffstat (limited to 'test/sysutils')
-rwxr-xr-xtest/sysutils/less.exp20
-rwxr-xr-xtest/sysutils/sysutils.sh18
-rwxr-xr-xtest/sysutils/xz.exp26
3 files changed, 64 insertions, 0 deletions
diff --git a/test/sysutils/less.exp b/test/sysutils/less.exp
new file mode 100755
index 000000000..720830304
--- /dev/null
+++ b/test/sysutils/less.exp
@@ -0,0 +1,20 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail less ../../Makefile.in\r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 "MYLIBS"
14}
15expect {
16 timeout {puts "TESTING ERROR 2\n";exit}
17 "APPS"
18}
19
20puts "\nall done\n"
diff --git a/test/sysutils/sysutils.sh b/test/sysutils/sysutils.sh
index f230c9a6b..d75738f97 100755
--- a/test/sysutils/sysutils.sh
+++ b/test/sysutils/sysutils.sh
@@ -42,3 +42,21 @@ else
42 echo "TESTING SKIP: xzdec not found" 42 echo "TESTING SKIP: xzdec not found"
43fi 43fi
44 44
45which xz
46if [ "$?" -eq 0 ];
47then
48 echo "TESTING: xz"
49 ./xz.exp
50else
51 echo "TESTING SKIP: xz not found"
52fi
53
54which less
55if [ "$?" -eq 0 ];
56then
57 echo "TESTING: less"
58 ./less.exp
59else
60 echo "TESTING SKIP: less not found"
61fi
62
diff --git a/test/sysutils/xz.exp b/test/sysutils/xz.exp
new file mode 100755
index 000000000..11d0e560c
--- /dev/null
+++ b/test/sysutils/xz.exp
@@ -0,0 +1,26 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "/usr/bin/xz -c /usr/bin/firejail > firejail_t1\r"
11sleep 1
12
13send -- "firejail /usr/bin/xz -c /usr/bin/firejail > firejail_t2\r"
14sleep 1
15
16send -- "diff -s firejail_t1 firejail_t2\r"
17expect {
18 timeout {puts "TESTING ERROR 1\n";exit}
19 "firejail_t1 and firejail_t2 are identical"
20}
21
22send -- "rm firejail_t*\r"
23sleep 1
24
25
26puts "\nall done\n"