aboutsummaryrefslogtreecommitdiffstats
path: root/test/fs
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs')
-rwxr-xr-xtest/fs/fs.sh3
-rwxr-xr-xtest/fs/tab.exp46
-rw-r--r--test/fs/tab.profile1
3 files changed, 50 insertions, 0 deletions
diff --git a/test/fs/fs.sh b/test/fs/fs.sh
index 0ec714ffa..b49e447b7 100755
--- a/test/fs/fs.sh
+++ b/test/fs/fs.sh
@@ -10,6 +10,9 @@ export LC_ALL=C
10# These directories are required by some tests: 10# These directories are required by some tests:
11mkdir -p ~/Desktop ~/Documents ~/Downloads ~/Music ~/Pictures ~/Videos 11mkdir -p ~/Desktop ~/Documents ~/Downloads ~/Music ~/Pictures ~/Videos
12 12
13echo "TESTING: tab completion (test/fs/tab.exp)"
14./tab.exp
15
13rm -fr ~/_firejail_test_* 16rm -fr ~/_firejail_test_*
14echo "TESTING: mkdir/mkfile (test/fs/mkdir_mkfile.exp)" 17echo "TESTING: mkdir/mkfile (test/fs/mkdir_mkfile.exp)"
15./mkdir_mkfile.exp 18./mkdir_mkfile.exp
diff --git a/test/fs/tab.exp b/test/fs/tab.exp
new file mode 100755
index 000000000..cc9e11ed5
--- /dev/null
+++ b/test/fs/tab.exp
@@ -0,0 +1,46 @@
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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10
11send -- "firejail --private ls -al\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15}
16expect {
17 timeout {puts "TESTING ERROR 1\n";exit}
18 ".inputrc"
19}
20sleep 1
21
22send -- "firejail --private --tab ls -al\r"
23expect {
24 timeout {puts "TESTING ERROR 2\n";exit}
25 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
26}
27expect {
28 timeout {puts "TESTING ERROR 3\n";exit}
29 ".inputrc" {puts "TESTING ERROR 4\n";exit}
30 "Parent is shutting down"
31}
32sleep 1
33
34send -- "firejail --private --profile=tab.profile ls -al\r"
35expect {
36 timeout {puts "TESTING ERROR 5\n";exit}
37 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
38}
39expect {
40 timeout {puts "TESTING ERROR 6\n";exit}
41 ".inputrc" {puts "TESTING ERROR 7\n";exit}
42 "Parent is shutting down"
43}
44sleep 1
45
46puts "\nall done\n"
diff --git a/test/fs/tab.profile b/test/fs/tab.profile
new file mode 100644
index 000000000..8cc35a3d5
--- /dev/null
+++ b/test/fs/tab.profile
@@ -0,0 +1 @@
tab