aboutsummaryrefslogtreecommitdiff
path: root/reg_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'reg_test.sh')
-rwxr-xr-xreg_test.sh40
1 files changed, 21 insertions, 19 deletions
diff --git a/reg_test.sh b/reg_test.sh
index 0a30ae305..2a73fc511 100755
--- a/reg_test.sh
+++ b/reg_test.sh
@@ -6,26 +6,22 @@ rm -rf testdir
6./busybox cp tar.c testdir 6./busybox cp tar.c testdir
7 7
8if ! eval diff -u tar.c testdir ; then 8if ! eval diff -u tar.c testdir ; then
9 echo " "
10 echo "Bummer. File copy failed." 9 echo "Bummer. File copy failed."
11 exit 0 10 exit 0
12else 11else
13 echo "Cool. File copy is ok." 12 echo "Cool. File copy is ok."
14fi 13fi
15echo " "
16 14
17rm -rf testdir 15rm -rf testdir
18mkdir -p testdir/foo 16mkdir -p testdir/foo
19./busybox cp tar.c testdir/foo 17./busybox cp tar.c testdir/foo
20 18
21if ! eval diff -u tar.c testdir/foo/tar.c ; then 19if ! eval diff -u tar.c testdir/foo/tar.c ; then
22 echo " "
23 echo "Bummer. File copy to a directory failed." 20 echo "Bummer. File copy to a directory failed."
24 exit 0 21 exit 0
25else 22else
26 echo "Cool. File copy to a directory is ok." 23 echo "Cool. File copy to a directory is ok."
27fi 24fi
28echo " "
29 25
30 26
31rm -rf testdir 27rm -rf testdir
@@ -33,13 +29,11 @@ mkdir -p testdir/foo
33./busybox cp tar.c testdir/foo/ 29./busybox cp tar.c testdir/foo/
34 30
35if ! eval diff -u tar.c testdir/foo/tar.c ; then 31if ! eval diff -u tar.c testdir/foo/tar.c ; then
36 echo " "
37 echo "Bummer. File copy to a directory w/ a '/' failed." 32 echo "Bummer. File copy to a directory w/ a '/' failed."
38 exit 0 33 exit 0
39else 34else
40 echo "Cool. File copy to a directory w/ a '/' is ok." 35 echo "Cool. File copy to a directory w/ a '/' is ok."
41fi 36fi
42echo " "
43 37
44 38
45rm -rf testdir X11 39rm -rf testdir X11
@@ -47,63 +41,53 @@ cp -a /etc/X11 .
47./busybox cp -a X11 testdir 41./busybox cp -a X11 testdir
48 42
49if ! eval diff -ur X11 testdir ; then 43if ! eval diff -ur X11 testdir ; then
50 echo " "
51 echo "Bummer. Local dir copy failed." 44 echo "Bummer. Local dir copy failed."
52 exit 0 45 exit 0
53else 46else
54 echo "Cool. Local dir copy is ok." 47 echo "Cool. Local dir copy is ok."
55fi 48fi
56echo " "
57 49
58rm -rf testdir X11 50rm -rf testdir X11
59cp -a /etc/X11 . 51cp -a /etc/X11 .
60./busybox cp -a X11 testdir/ 52./busybox cp -a X11 testdir/
61 53
62if ! eval diff -ur X11 testdir ; then 54if ! eval diff -ur X11 testdir ; then
63 echo " "
64 echo "Bummer. Local dir copy w/ a '/' failed." 55 echo "Bummer. Local dir copy w/ a '/' failed."
65 exit 0 56 exit 0
66else 57else
67 echo "Cool. Local dir copy w/ a '/' is ok." 58 echo "Cool. Local dir copy w/ a '/' is ok."
68fi 59fi
69echo " "
70 60
71rm -rf testdir X11 61rm -rf testdir X11
72cp -a /etc/X11 . 62cp -a /etc/X11 .
73./busybox cp -a X11/ testdir 63./busybox cp -a X11/ testdir
74 64
75if ! eval diff -ur X11 testdir ; then 65if ! eval diff -ur X11 testdir ; then
76 echo " "
77 echo "Bummer. Local dir copy w/ a src '/' failed." 66 echo "Bummer. Local dir copy w/ a src '/' failed."
78 exit 0 67 exit 0
79else 68else
80 echo "Cool. Local dir copy w/ a src '/' is ok." 69 echo "Cool. Local dir copy w/ a src '/' is ok."
81fi 70fi
82echo " "
83 71
84rm -rf testdir X11 72rm -rf testdir X11
85cp -a /etc/X11 . 73cp -a /etc/X11 .
86./busybox cp -a X11/ testdir/ 74./busybox cp -a X11/ testdir/
87 75
88if ! eval diff -ur X11 testdir ; then 76if ! eval diff -ur X11 testdir ; then
89 echo " "
90 echo "Bummer. Local dir copy w/ 2x '/'s failed." 77 echo "Bummer. Local dir copy w/ 2x '/'s failed."
91 exit 0 78 exit 0
92else 79else
93 echo "Cool. Local dir copy w/ 2x '/'s is ok." 80 echo "Cool. Local dir copy w/ 2x '/'s is ok."
94fi 81fi
95echo " "
96 82
97rm -rf testdir X11 83rm -rf testdir X11
98./busybox cp -a /etc/X11 testdir 84./busybox cp -a /etc/X11 testdir
99if ! eval diff -ur /etc/X11 testdir ; then 85if ! eval diff -ur /etc/X11 testdir ; then
100 echo " "
101 echo "Bummer. Remote dir copy failed." 86 echo "Bummer. Remote dir copy failed."
102 exit 0 87 exit 0
103else 88else
104 echo "Cool. Remote dir copy is ok." 89 echo "Cool. Remote dir copy is ok."
105fi 90fi
106echo " "
107 91
108 92
109rm -rf testdir X11 93rm -rf testdir X11
@@ -111,13 +95,11 @@ mkdir -p testdir/foo
111 95
112./busybox cp -a /etc/X11 testdir/foo 96./busybox cp -a /etc/X11 testdir/foo
113if ! eval diff -ur /etc/X11 testdir/foo ; then 97if ! eval diff -ur /etc/X11 testdir/foo ; then
114 echo " "
115 echo "Bummer. Remote dir copy to a directory failed." 98 echo "Bummer. Remote dir copy to a directory failed."
116 exit 0 99 exit 0
117else 100else
118 echo "Cool. Remote dir copy to a directory is ok." 101 echo "Cool. Remote dir copy to a directory is ok."
119fi 102fi
120echo " "
121 103
122 104
123rm -rf testdir X11 105rm -rf testdir X11
@@ -125,7 +107,6 @@ mkdir -p testdir/foo
125 107
126./busybox cp -a /etc/X11 testdir/foo/ 108./busybox cp -a /etc/X11 testdir/foo/
127if ! eval diff -ur /etc/X11 testdir/foo ; then 109if ! eval diff -ur /etc/X11 testdir/foo ; then
128 echo " "
129 echo "Bummer. Remote dir copy to a directory w/ a '/' failed." 110 echo "Bummer. Remote dir copy to a directory w/ a '/' failed."
130 exit 0 111 exit 0
131else 112else
@@ -134,3 +115,24 @@ fi
134 115
135rm -rf testdir 116rm -rf testdir
136 117
118
119rm -rf foo bar
120mkdir foo
121mkdir bar
122
123if ! eval ./busybox cp README foo ; then
124 echo "Bummer. cp README foo failed."
125 exit 0
126else
127 echo "Cool. cp README foo is ok."
128fi
129
130if ! eval ./busybox cp foo/README bar ; then
131 echo "Bummer. cp foo/README bar failed."
132 exit 0
133else
134 echo "Cool. cp foo/README bar is ok."
135fi
136
137rm -rf foo bar
138