aboutsummaryrefslogtreecommitdiff
path: root/reg_test.sh
blob: 2a73fc5117e0354ac2f206e6e45c3b65dc89e81b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/bin/sh



rm -rf testdir
./busybox cp tar.c testdir

if ! eval diff -u tar.c testdir ; then
    echo "Bummer.  File copy failed."
    exit 0
else
    echo "Cool.  File copy is ok."
fi

rm -rf testdir
mkdir -p testdir/foo
./busybox cp tar.c testdir/foo

if ! eval diff -u tar.c testdir/foo/tar.c ; then
    echo "Bummer.  File copy to a directory failed."
    exit 0
else
    echo "Cool.  File copy to a directory is ok."
fi


rm -rf testdir
mkdir -p testdir/foo
./busybox cp tar.c testdir/foo/

if ! eval diff -u tar.c testdir/foo/tar.c ; then
    echo "Bummer.  File copy to a directory w/ a '/' failed."
    exit 0
else
    echo "Cool.  File copy to a directory w/ a '/' is ok."
fi


rm -rf testdir X11
cp -a /etc/X11 .
./busybox cp -a X11 testdir

if ! eval diff -ur X11 testdir ; then
    echo "Bummer.  Local dir copy failed."
    exit 0
else
    echo "Cool.  Local dir copy is ok."
fi

rm -rf testdir X11
cp -a /etc/X11 .
./busybox cp -a X11 testdir/

if ! eval diff -ur X11 testdir ; then
    echo "Bummer.  Local dir copy w/ a '/' failed."
    exit 0
else
    echo "Cool.  Local dir copy w/ a '/' is ok."
fi

rm -rf testdir X11
cp -a /etc/X11 .
./busybox cp -a X11/ testdir

if ! eval diff -ur X11 testdir ; then
    echo "Bummer.  Local dir copy w/ a src '/' failed."
    exit 0
else
    echo "Cool.  Local dir copy w/ a src '/' is ok."
fi

rm -rf testdir X11
cp -a /etc/X11 .
./busybox cp -a X11/ testdir/

if ! eval diff -ur X11 testdir ; then
    echo "Bummer.  Local dir copy w/ 2x '/'s failed."
    exit 0
else
    echo "Cool.  Local dir copy w/ 2x '/'s is ok."
fi

rm -rf testdir X11
./busybox cp -a /etc/X11 testdir
if ! eval diff -ur /etc/X11 testdir ; then
    echo "Bummer.  Remote dir copy failed."
    exit 0
else
    echo "Cool.  Remote dir copy is ok."
fi


rm -rf testdir X11
mkdir -p testdir/foo

./busybox cp -a /etc/X11 testdir/foo
if ! eval diff -ur /etc/X11 testdir/foo ; then
    echo "Bummer.  Remote dir copy to a directory failed."
    exit 0
else
    echo "Cool.  Remote dir copy to a directory is ok."
fi


rm -rf testdir X11
mkdir -p testdir/foo

./busybox cp -a /etc/X11 testdir/foo/
if ! eval diff -ur /etc/X11 testdir/foo ; then
    echo "Bummer.  Remote dir copy to a directory w/ a '/' failed."
    exit 0
else
    echo "Cool.  Remote dir copy to a directory w/ a '/' is ok."
fi

rm -rf testdir


rm -rf foo bar
mkdir foo
mkdir bar

if ! eval ./busybox cp README foo ; then
    echo "Bummer.  cp README foo failed."
    exit 0
else
    echo "Cool.  cp README foo is ok."
fi

if ! eval ./busybox cp foo/README bar ; then
    echo "Bummer.  cp foo/README bar failed."
    exit 0
else
    echo "Cool.  cp foo/README bar is ok."
fi

rm -rf foo bar