The latest and greatest. init basically works, though needs
[oweals/busybox.git] / reg_test.sh
1 #!/bin/sh
2
3
4
5 rm -rf testdir
6 ./busybox cp tar.c testdir
7
8 if ! eval diff -u tar.c testdir ; then
9     echo " "
10     echo "Bummer.  File copy failed."
11     exit 0
12 else
13     echo "Cool.  File copy is ok."
14 fi
15 echo " "
16
17 rm -rf testdir
18 mkdir -p testdir/foo
19 ./busybox cp tar.c testdir/foo
20
21 if ! eval diff -u tar.c testdir/foo/tar.c ; then
22     echo " "
23     echo "Bummer.  File copy to a directory failed."
24     exit 0
25 else
26     echo "Cool.  File copy to a directory is ok."
27 fi
28 echo " "
29
30
31 rm -rf testdir
32 mkdir -p testdir/foo
33 ./busybox cp tar.c testdir/foo/
34
35 if ! eval diff -u tar.c testdir/foo/tar.c ; then
36     echo " "
37     echo "Bummer.  File copy to a directory w/ a '/' failed."
38     exit 0
39 else
40     echo "Cool.  File copy to a directory w/ a '/' is ok."
41 fi
42 echo " "
43
44
45 rm -rf testdir X11
46 cp -a /etc/X11 .
47 ./busybox cp -a X11 testdir
48
49 if ! eval diff -ur X11 testdir ; then
50     echo " "
51     echo "Bummer.  Local dir copy failed."
52     exit 0
53 else
54     echo "Cool.  Local dir copy is ok."
55 fi
56 echo " "
57
58 rm -rf testdir X11
59 cp -a /etc/X11 .
60 ./busybox cp -a X11 testdir/
61
62 if ! eval diff -ur X11 testdir ; then
63     echo " "
64     echo "Bummer.  Local dir copy w/ a '/' failed."
65     exit 0
66 else
67     echo "Cool.  Local dir copy w/ a '/' is ok."
68 fi
69 echo " "
70
71 rm -rf testdir X11
72 cp -a /etc/X11 .
73 ./busybox cp -a X11/ testdir
74
75 if ! eval diff -ur X11 testdir ; then
76     echo " "
77     echo "Bummer.  Local dir copy w/ a src '/' failed."
78     exit 0
79 else
80     echo "Cool.  Local dir copy w/ a src '/' is ok."
81 fi
82 echo " "
83
84 rm -rf testdir X11
85 cp -a /etc/X11 .
86 ./busybox cp -a X11/ testdir/
87
88 if ! eval diff -ur X11 testdir ; then
89     echo " "
90     echo "Bummer.  Local dir copy w/ 2x '/'s failed."
91     exit 0
92 else
93     echo "Cool.  Local dir copy w/ 2x '/'s is ok."
94 fi
95 echo " "
96
97 rm -rf testdir X11
98 ./busybox cp -a /etc/X11 testdir
99 if ! eval diff -ur /etc/X11 testdir ; then
100     echo " "
101     echo "Bummer.  Remote dir copy failed."
102     exit 0
103 else
104     echo "Cool.  Remote dir copy is ok."
105 fi
106 echo " "
107
108
109 rm -rf testdir X11
110 mkdir -p testdir/foo
111
112 ./busybox cp -a /etc/X11 testdir/foo
113 if ! eval diff -ur /etc/X11 testdir/foo ; then
114     echo " "
115     echo "Bummer.  Remote dir copy to a directory failed."
116     exit 0
117 else
118     echo "Cool.  Remote dir copy to a directory is ok."
119 fi
120 echo " "
121
122
123 rm -rf testdir X11
124 mkdir -p testdir/foo
125
126 ./busybox cp -a /etc/X11 testdir/foo/
127 if ! eval diff -ur /etc/X11 testdir/foo ; then
128     echo " "
129     echo "Bummer.  Remote dir copy to a directory w/ a '/' failed."
130     exit 0
131 else
132     echo "Cool.  Remote dir copy to a directory w/ a '/' is ok."
133 fi
134
135 rm -rf testdir
136