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