aboutsummaryrefslogtreecommitdiffstats
path: root/test/fcopy/linkcopy.exp
diff options
context:
space:
mode:
authorLibravatar curiosity-seeker <seeker@posteo.org>2016-12-15 12:58:32 +0100
committerLibravatar GitHub <noreply@github.com>2016-12-15 12:58:32 +0100
commitd8ee390a6ca56fde4baad57dea7572c39d595809 (patch)
tree255252b15232086e6f65203cda676859ab4117a0 /test/fcopy/linkcopy.exp
parentUpdate quiterss.profile (diff)
parentadded a 1 second delay after xpra server is started (diff)
downloadfirejail-d8ee390a6ca56fde4baad57dea7572c39d595809.tar.gz
firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.tar.zst
firejail-d8ee390a6ca56fde4baad57dea7572c39d595809.zip
Merge pull request #1 from netblue30/master
Bring fork up-to-date
Diffstat (limited to 'test/fcopy/linkcopy.exp')
-rwxr-xr-xtest/fcopy/linkcopy.exp54
1 files changed, 54 insertions, 0 deletions
diff --git a/test/fcopy/linkcopy.exp b/test/fcopy/linkcopy.exp
new file mode 100755
index 000000000..9927e18fe
--- /dev/null
+++ b/test/fcopy/linkcopy.exp
@@ -0,0 +1,54 @@
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
6#
7# copy directory src to dest
8#
9set timeout 10
10spawn $env(SHELL)
11match_max 100000
12
13send -- "rm -fr dest/*\r"
14after 100
15
16send -- "/usr/lib/firejail/fcopy src/dircopy.exp dest\r"
17after 100
18
19send -- "find dest\r"
20expect {
21 timeout {puts "TESTING ERROR 0\n";exit}
22 "dest/"
23}
24expect {
25 timeout {puts "TESTING ERROR 1\n";exit}
26 "dest/dircopy.exp"
27}
28after 100
29
30
31send -- "ls -al dest\r"
32expect {
33 timeout {puts "TESTING ERROR 2\n";exit}
34 "lrwxrwxrwx"
35}
36after 100
37
38send -- "diff -q dircopy.exp dest/dircopy.exp; echo done\r"
39expect {
40 timeout {puts "TESTING ERROR 3\n";exit}
41 "differ" {puts "TESTING ERROR 4\n";exit}
42 "done"
43}
44
45send -- "file dest/dircopy.exp\r"
46expect {
47 timeout {puts "TESTING ERROR 5\n";exit}
48 "symbolic link"
49}
50
51send -- "rm -fr dest/*\r"
52after 100
53
54puts "\nall done\n"