aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/ls.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils/ls.exp')
-rwxr-xr-xtest/utils/ls.exp42
1 files changed, 37 insertions, 5 deletions
diff --git a/test/utils/ls.exp b/test/utils/ls.exp
index cd2c2984c..ff6867c51 100755
--- a/test/utils/ls.exp
+++ b/test/utils/ls.exp
@@ -3,6 +3,8 @@
3set timeout 10 3set timeout 10
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6set firstspawn $spawn_id
7
6 8
7send -- "rm -f lstesting\r" 9send -- "rm -f lstesting\r"
8sleep 1 10sleep 1
@@ -11,11 +13,11 @@ expect {
11 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
12 "Child process initialized" 14 "Child process initialized"
13} 15}
14sleep 2 16sleep 1
15send -- "echo my_testing > ~/lstesting\r" 17send -- "echo my_testing > ~/lstesting\r"
16sleep 2 18after 100
17
18 19
20# ls
19spawn $env(SHELL) 21spawn $env(SHELL)
20send -- "firejail --ls=test ~/.\r" 22send -- "firejail --ls=test ~/.\r"
21expect { 23expect {
@@ -23,14 +25,44 @@ expect {
23 "lstesting" 25 "lstesting"
24} 26}
25sleep 1 27sleep 1
28
29# get
26send -- "firejail --get=test ~/lstesting\r" 30send -- "firejail --get=test ~/lstesting\r"
27sleep 2 31sleep 1
28send -- "cat lstesting\r" 32send -- "cat lstesting\r"
29expect { 33expect {
30 timeout {puts "TESTING ERROR 3\n";exit} 34 timeout {puts "TESTING ERROR 2n";exit}
31 "my_testing" 35 "my_testing"
32} 36}
37after 100
38
39# put
40send -- "echo put_test > ~/lstesting\r"
41after 100
42send -- "firejail --put=test ~/lstesting ~/lstesting_2\r"
33sleep 1 43sleep 1
44
45set spawn_id $firstspawn
46send -- "ls -al ~\r"
47expect {
48 timeout {puts "TESTING ERROR 3\n";exit}
49 "lstesting_2"
50}
51
52after 100
53send -- "cat ~/lstesting_2\r"
54expect {
55 timeout {puts "TESTING ERROR 4\n";exit}
56 "put_test"
57}
58after 100
59send -- "exit\r"
60sleep 1
61
62
63
64
65
34send -- "rm -f lstesting\r" 66send -- "rm -f lstesting\r"
35 67
36after 100 68after 100