aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorerik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-04-21 21:53:58 +0000
committererik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-04-21 21:53:58 +0000
commit349c17641b8f75d29e4af0eee12c4fe9bdfd015c (patch)
tree0f515205daab08e90ee59594b76a8964551e7459 /tests
parentf2d936410c1523ab9bfc0663053d444589b2e7d7 (diff)
downloadbusybox-w32-349c17641b8f75d29e4af0eee12c4fe9bdfd015c.tar.gz
busybox-w32-349c17641b8f75d29e4af0eee12c4fe9bdfd015c.tar.bz2
busybox-w32-349c17641b8f75d29e4af0eee12c4fe9bdfd015c.zip
Some more updates and such...
-Erik git-svn-id: svn://busybox.net/trunk/busybox@493 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'tests')
-rw-r--r--tests/cp_tests.mk55
1 files changed, 31 insertions, 24 deletions
diff --git a/tests/cp_tests.mk b/tests/cp_tests.mk
index e79f2b38b..2082d7386 100644
--- a/tests/cp_tests.mk
+++ b/tests/cp_tests.mk
@@ -20,12 +20,14 @@ cp_tests: cp_clean cp
20 @echo "Some tests might show timestamp differences that are Ok."; 20 @echo "Some tests might show timestamp differences that are Ok.";
21 21
22 @echo; 22 @echo;
23 ${BCP} || true; 23 @echo Verify that busybox cp exists;
24 @echo ------------------------------;
25 [ -x ${BCP} ] || exit 0
24 26
25 @echo; 27 @echo;
26 mkdir cp_tests; 28 mkdir cp_tests;
27 29
28 # Copy a file to a copy of the file 30 @echo Copy a file to a copy of the file;
29 @echo ------------------------------; 31 @echo ------------------------------;
30 cd cp_tests; \ 32 cd cp_tests; \
31 echo A file > afile; \ 33 echo A file > afile; \
@@ -50,8 +52,8 @@ cp_tests: cp_clean cp
50 @echo; 52 @echo;
51 rm -rf cp_tests/*; 53 rm -rf cp_tests/*;
52 54
53 # Copy a file pointed to by a symlink 55 @echo; echo Copy a file pointed to by a symlink;
54 @echo; echo ------------------------------; 56 @echo ------------------------------;
55 cd cp_tests; \ 57 cd cp_tests; \
56 mkdir here there; \ 58 mkdir here there; \
57 echo A file > afile; \ 59 echo A file > afile; \
@@ -82,21 +84,21 @@ cp_tests: cp_clean cp
82 @echo; 84 @echo;
83 rm -rf cp_tests/* 85 rm -rf cp_tests/*
84 86
85 # Copy a symlink, useing the -a switch. 87 @echo; echo Copy a symlink, useing the -a switch.;
86 @echo; echo ------------------------------; 88 @echo ------------------------------;
87 cd cp_tests; \ 89 cd cp_tests; \
88 echo A file > afile; \ 90 echo A file > afile; \
89 mkdir here there; \ 91 mkdir here there; \
90 cd here; \ 92 cd here; \
91 ln -s ../afile . 93 ln -s ../afile .
92 94
93 cd cp_test; \ 95 cd cp_tests; \
94 ls -lR . > ../cp_a_symlink.gnu; \ 96 ls -lR . > ../cp_a_symlink.gnu; \
95 ${GCP} -a here/afile there; \ 97 ${GCP} -a here/afile there; \
96 ls -lR . >> ../cp_a_symlink.gnu; 98 ls -lR . >> ../cp_a_symlink.gnu;
97 99
98 @echo; 100 @echo;
99 rm -f cp_tests/there/*; 101 rm -rf cp_tests/there/*;
100 102
101 sleep 1; 103 sleep 1;
102 104
@@ -111,10 +113,10 @@ cp_tests: cp_clean cp
111 diff -u cp_a_symlink.gnu cp_a_symlink.bb; 113 diff -u cp_a_symlink.gnu cp_a_symlink.bb;
112 114
113 @echo; 115 @echo;
114 rm -f cp_tests/*; 116 rm -rf cp_tests/*;
115 117
116 # Copy a directory into another directory with the -a switch 118 @echo; echo Copy a directory into another directory with the -a switch;
117 @echo; echo ------------------------------; 119 @echo ------------------------------;
118 cd cp_tests; \ 120 cd cp_tests; \
119 mkdir here there; \ 121 mkdir here there; \
120 echo A file > here/afile; \ 122 echo A file > here/afile; \
@@ -145,8 +147,9 @@ cp_tests: cp_clean cp
145 @echo; 147 @echo;
146 rm -rf cp_tests/*; 148 rm -rf cp_tests/*;
147 149
148 # Copy a set of files to a directory. 150 # Copy a set of files to a directory.
149 @echo; echo ------------------------------; 151 @echo; echo Copy a set of files to a directory.;
152 @echo ------------------------------;
150 cd cp_tests; \ 153 cd cp_tests; \
151 echo A file number one > afile1; \ 154 echo A file number one > afile1; \
152 echo A file number two, blah. > afile2; \ 155 echo A file number two, blah. > afile2; \
@@ -171,8 +174,9 @@ cp_tests: cp_clean cp
171 @echo; 174 @echo;
172 rm -rf cp_tests/*; 175 rm -rf cp_tests/*;
173 176
174 # Copy a set of files to a directory with the -d switch. 177 # Copy a set of files to a directory with the -d switch.
175 @echo; echo ------------------------------; 178 @echo; echo Copy a set of files to a directory with the -d switch.;
179 @echo ------------------------------;
176 cd cp_tests; \ 180 cd cp_tests; \
177 echo A file number one > afile1; \ 181 echo A file number one > afile1; \
178 echo A file number two, blah. > afile2; \ 182 echo A file number two, blah. > afile2; \
@@ -199,8 +203,9 @@ cp_tests: cp_clean cp
199 @echo; 203 @echo;
200 rm -rf cp_tests/{afile{1,2},symlink1,there1}; 204 rm -rf cp_tests/{afile{1,2},symlink1,there1};
201 205
202 # Copy a set of files to a directory with the -p switch. 206 # Copy a set of files to a directory with the -p switch.
203 @echo; echo ------------------------------; 207 @echo; echo Copy a set of files to a directory with the -p switch.;
208 @echo ------------------------------;
204 cd cp_tests; \ 209 cd cp_tests; \
205 echo A file number one > afile1; \ 210 echo A file number one > afile1; \
206 echo A file number two, blah. > afile2; \ 211 echo A file number two, blah. > afile2; \
@@ -229,8 +234,8 @@ cp_tests: cp_clean cp
229 @echo; 234 @echo;
230 rm -rf cp_tests/{afile{1,2},symlink1,there1}; 235 rm -rf cp_tests/{afile{1,2},symlink1,there1};
231 236
232 # Copy a set of files to a directory with -p and -d switches. 237 @echo; echo Copy a set of files to a directory with -p and -d switches.
233 @echo; echo ------------------------------; 238 @echo ------------------------------;
234 cd cp_tests; \ 239 cd cp_tests; \
235 echo A file number one > afile1; \ 240 echo A file number one > afile1; \
236 echo A file number two, blah. > afile2; \ 241 echo A file number two, blah. > afile2; \
@@ -259,8 +264,8 @@ cp_tests: cp_clean cp
259 @echo; 264 @echo;
260 rm -rf cp_tests/{afile{1,2},symlink1,there1}; 265 rm -rf cp_tests/{afile{1,2},symlink1,there1};
261 266
262 # Copy a directory into another directory with the -a switch. 267 @echo; echo Copy a directory into another directory with the -a switch.
263 @echo; echo ------------------------------; 268 @echo ------------------------------;
264 cd cp_tests; \ 269 cd cp_tests; \
265 mkdir dir{a,b}; \ 270 mkdir dir{a,b}; \
266 echo A file > dira/afile; \ 271 echo A file > dira/afile; \
@@ -293,8 +298,9 @@ cp_tests: cp_clean cp
293 @echo; 298 @echo;
294 rm -rf cp_tests/dir{a,b}; 299 rm -rf cp_tests/dir{a,b};
295 300
296 # Copy a directory to another directory, without the -a switch. 301 # Copy a directory to another directory, without the -a switch.
297 @echo; echo ------------------------------; 302 @echo; echo Copy a directory to another directory, without the -a switch.
303 @echo ------------------------------;
298 @echo There should be an error message about cannot cp a dir to a subdir of itself. 304 @echo There should be an error message about cannot cp a dir to a subdir of itself.
299 cd cp_tests; \ 305 cd cp_tests; \
300 touch a b c; \ 306 touch a b c; \
@@ -314,7 +320,8 @@ cp_tests: cp_clean cp
314 320
315 @echo; 321 @echo;
316 diff -u cp_a_star_adir.gnu cp_a_star_adir.bb; 322 diff -u cp_a_star_adir.gnu cp_a_star_adir.bb;
317 323
324 # Done
318 @echo; 325 @echo;
319 rm -rf cp_tests; 326 rm -rf cp_tests;
320 @echo; echo Done. 327 @echo; echo Done.