3 c8c71e6e 2020-03-21 stsp # Copyright (c) 2020 Stefan Sperling <stsp@openbsd.org>
5 c8c71e6e 2020-03-21 stsp # Permission to use, copy, modify, and distribute this software for any
6 c8c71e6e 2020-03-21 stsp # purpose with or without fee is hereby granted, provided that the above
7 c8c71e6e 2020-03-21 stsp # copyright notice and this permission notice appear in all copies.
9 c8c71e6e 2020-03-21 stsp # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 c8c71e6e 2020-03-21 stsp # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 c8c71e6e 2020-03-21 stsp # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 c8c71e6e 2020-03-21 stsp # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 c8c71e6e 2020-03-21 stsp # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 c8c71e6e 2020-03-21 stsp # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 c8c71e6e 2020-03-21 stsp # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 c8c71e6e 2020-03-21 stsp . ./common.sh
19 c8c71e6e 2020-03-21 stsp function test_clone_basic {
20 c8c71e6e 2020-03-21 stsp local testroot=`test_init clone_basic`
21 c8c71e6e 2020-03-21 stsp local testurl=ssh://127.0.0.1/$testroot
22 c8c71e6e 2020-03-21 stsp local commit_id=`git_show_head $testroot/repo`
24 c8c71e6e 2020-03-21 stsp got clone -q $testurl/repo $testroot/repo-clone
26 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
27 c8c71e6e 2020-03-21 stsp echo "got clone command failed unexpectedly" >&2
28 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
32 c8c71e6e 2020-03-21 stsp got log -l0 -p -r $testroot/repo > $testroot/log-repo
33 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
34 c8c71e6e 2020-03-21 stsp echo "got log command failed unexpectedly" >&2
35 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
38 c8c71e6e 2020-03-21 stsp got log -l0 -p -r $testroot/repo > $testroot/log-repo-clone
39 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
40 c8c71e6e 2020-03-21 stsp echo "got log command failed unexpectedly" >&2
41 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
44 c8c71e6e 2020-03-21 stsp cmp -s $testroot/log-repo $testroot/log-repo-clone
46 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
47 c8c71e6e 2020-03-21 stsp echo "log -p output of cloned repository differs" >&2
48 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
52 c8c71e6e 2020-03-21 stsp got ref -l -r $testroot/repo > $testroot/stdout
53 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
54 c8c71e6e 2020-03-21 stsp echo "got ref command failed unexpectedly" >&2
55 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
59 c8c71e6e 2020-03-21 stsp echo "HEAD: refs/heads/master" > $testroot/stdout.expected
60 c8c71e6e 2020-03-21 stsp echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
62 c8c71e6e 2020-03-21 stsp cmp -s $testroot/stdout $testroot/stdout.expected
64 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
65 c8c71e6e 2020-03-21 stsp diff -u $testroot/stdout.expected $testroot/stdout
66 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
70 c8c71e6e 2020-03-21 stsp got ref -l -r $testroot/repo-clone > $testroot/stdout
71 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
72 c8c71e6e 2020-03-21 stsp echo "got ref command failed unexpectedly" >&2
73 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
77 c8c71e6e 2020-03-21 stsp echo "HEAD: refs/heads/master" > $testroot/stdout.expected
78 c8c71e6e 2020-03-21 stsp echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
79 f298ae0f 2020-03-25 stsp echo "refs/remotes/origin/HEAD: refs/remotes/origin/master" \
80 f298ae0f 2020-03-25 stsp >> $testroot/stdout.expected
81 c8c71e6e 2020-03-21 stsp echo "refs/remotes/origin/master: $commit_id" \
82 c8c71e6e 2020-03-21 stsp >> $testroot/stdout.expected
84 c8c71e6e 2020-03-21 stsp cmp -s $testroot/stdout $testroot/stdout.expected
86 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
87 c8c71e6e 2020-03-21 stsp diff -u $testroot/stdout.expected $testroot/stdout
89 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
92 c8c71e6e 2020-03-21 stsp function test_clone_list {
93 c8c71e6e 2020-03-21 stsp local testroot=`test_init clone_list`
94 c8c71e6e 2020-03-21 stsp local testurl=ssh://127.0.0.1/$testroot
95 c8c71e6e 2020-03-21 stsp local commit_id=`git_show_head $testroot/repo`
97 c8c71e6e 2020-03-21 stsp got branch -r $testroot/repo -c $commit_id foo
98 e31abbf2 2020-03-22 stsp got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
99 c8c71e6e 2020-03-21 stsp got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
101 c8c71e6e 2020-03-21 stsp got clone -l $testurl/repo > $testroot/stdout 2>$testroot/stderr
103 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
104 c8c71e6e 2020-03-21 stsp echo "got clone command failed unexpectedly" >&2
105 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
109 d7c4e80d 2020-04-19 stsp echo "Connecting to 127.0.0.1" > $testroot/stdout.expected
110 c8c71e6e 2020-03-21 stsp got ref -l -r $testroot/repo >> $testroot/stdout.expected
112 c8c71e6e 2020-03-21 stsp cmp -s $testroot/stdout $testroot/stdout.expected
114 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
115 c8c71e6e 2020-03-21 stsp diff -u $testroot/stdout.expected $testroot/stdout
117 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
120 c8c71e6e 2020-03-21 stsp function test_clone_branch {
121 c8c71e6e 2020-03-21 stsp local testroot=`test_init clone_branch`
122 c8c71e6e 2020-03-21 stsp local testurl=ssh://127.0.0.1/$testroot
123 c8c71e6e 2020-03-21 stsp local commit_id=`git_show_head $testroot/repo`
125 c8c71e6e 2020-03-21 stsp got branch -r $testroot/repo -c $commit_id foo
126 e31abbf2 2020-03-22 stsp got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
127 c8c71e6e 2020-03-21 stsp got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
128 c8c71e6e 2020-03-21 stsp local tag_id=`got ref -r $testroot/repo -l \
129 c8c71e6e 2020-03-21 stsp | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
131 c8c71e6e 2020-03-21 stsp got clone -q -b foo $testurl/repo $testroot/repo-clone
133 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
134 c8c71e6e 2020-03-21 stsp echo "got clone command failed unexpectedly" >&2
135 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
139 c8c71e6e 2020-03-21 stsp got ref -l -r $testroot/repo-clone > $testroot/stdout
141 c8c71e6e 2020-03-21 stsp echo "HEAD: refs/heads/foo" > $testroot/stdout.expected
142 c8c71e6e 2020-03-21 stsp echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
143 c8c71e6e 2020-03-21 stsp # refs/heads/master is missing because it wasn't passed via -b
144 c8c71e6e 2020-03-21 stsp echo "refs/remotes/origin/foo: $commit_id" >> $testroot/stdout.expected
145 c8c71e6e 2020-03-21 stsp # refs/hoo/boo/zoo is missing because it is outside of refs/heads
146 c8c71e6e 2020-03-21 stsp echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
148 c8c71e6e 2020-03-21 stsp cmp -s $testroot/stdout $testroot/stdout.expected
150 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
151 c8c71e6e 2020-03-21 stsp diff -u $testroot/stdout.expected $testroot/stdout
153 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
156 c8c71e6e 2020-03-21 stsp function test_clone_all {
157 c8c71e6e 2020-03-21 stsp local testroot=`test_init clone_all`
158 c8c71e6e 2020-03-21 stsp local testurl=ssh://127.0.0.1/$testroot
159 c8c71e6e 2020-03-21 stsp local commit_id=`git_show_head $testroot/repo`
161 c8c71e6e 2020-03-21 stsp got branch -r $testroot/repo -c $commit_id foo
162 e31abbf2 2020-03-22 stsp got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
163 c8c71e6e 2020-03-21 stsp got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
164 c8c71e6e 2020-03-21 stsp local tag_id=`got ref -r $testroot/repo -l \
165 c8c71e6e 2020-03-21 stsp | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
167 c8c71e6e 2020-03-21 stsp got clone -q -a $testurl/repo $testroot/repo-clone
169 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
170 c8c71e6e 2020-03-21 stsp echo "got clone command failed unexpectedly" >&2
171 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
175 c8c71e6e 2020-03-21 stsp got ref -l -r $testroot/repo-clone > $testroot/stdout
177 c8c71e6e 2020-03-21 stsp echo "HEAD: refs/heads/master" > $testroot/stdout.expected
178 c8c71e6e 2020-03-21 stsp echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
179 c8c71e6e 2020-03-21 stsp echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
180 f298ae0f 2020-03-25 stsp echo "refs/remotes/origin/HEAD: refs/remotes/origin/master" \
181 f298ae0f 2020-03-25 stsp >> $testroot/stdout.expected
182 c8c71e6e 2020-03-21 stsp echo "refs/remotes/origin/foo: $commit_id" >> $testroot/stdout.expected
183 c8c71e6e 2020-03-21 stsp echo "refs/remotes/origin/master: $commit_id" \
184 c8c71e6e 2020-03-21 stsp >> $testroot/stdout.expected
185 c8c71e6e 2020-03-21 stsp # refs/hoo/boo/zoo is missing because it is outside of refs/heads
186 c8c71e6e 2020-03-21 stsp echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
188 c8c71e6e 2020-03-21 stsp cmp -s $testroot/stdout $testroot/stdout.expected
190 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
191 c8c71e6e 2020-03-21 stsp diff -u $testroot/stdout.expected $testroot/stdout
193 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
196 c8c71e6e 2020-03-21 stsp function test_clone_mirror {
197 c8c71e6e 2020-03-21 stsp local testroot=`test_init clone_mirror`
198 c8c71e6e 2020-03-21 stsp local testurl=ssh://127.0.0.1/$testroot
199 c8c71e6e 2020-03-21 stsp local commit_id=`git_show_head $testroot/repo`
201 c8c71e6e 2020-03-21 stsp got branch -r $testroot/repo -c $commit_id foo
202 e31abbf2 2020-03-22 stsp got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
203 c8c71e6e 2020-03-21 stsp got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
204 c8c71e6e 2020-03-21 stsp local tag_id=`got ref -r $testroot/repo -l \
205 c8c71e6e 2020-03-21 stsp | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
207 c8c71e6e 2020-03-21 stsp got clone -q -m $testurl/repo $testroot/repo-clone
209 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
210 c8c71e6e 2020-03-21 stsp echo "got clone command failed unexpectedly" >&2
211 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
215 c8c71e6e 2020-03-21 stsp got ref -l -r $testroot/repo-clone > $testroot/stdout
217 c8c71e6e 2020-03-21 stsp echo "HEAD: refs/heads/master" > $testroot/stdout.expected
218 c8c71e6e 2020-03-21 stsp # refs/heads/foo is missing because we're not fetching all branches
219 c8c71e6e 2020-03-21 stsp echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
220 c8c71e6e 2020-03-21 stsp # refs/hoo/boo/zoo is missing because it is outside of refs/heads
221 c8c71e6e 2020-03-21 stsp echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
223 c8c71e6e 2020-03-21 stsp cmp -s $testroot/stdout $testroot/stdout.expected
225 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
226 c8c71e6e 2020-03-21 stsp diff -u $testroot/stdout.expected $testroot/stdout
228 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
231 c8c71e6e 2020-03-21 stsp function test_clone_mirror_all {
232 c8c71e6e 2020-03-21 stsp local testroot=`test_init clone_mirror_all`
233 c8c71e6e 2020-03-21 stsp local testurl=ssh://127.0.0.1/$testroot
234 c8c71e6e 2020-03-21 stsp local commit_id=`git_show_head $testroot/repo`
236 c8c71e6e 2020-03-21 stsp got branch -r $testroot/repo -c $commit_id foo
237 e31abbf2 2020-03-22 stsp got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
238 c8c71e6e 2020-03-21 stsp got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
239 c8c71e6e 2020-03-21 stsp local tag_id=`got ref -r $testroot/repo -l \
240 c8c71e6e 2020-03-21 stsp | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
242 c8c71e6e 2020-03-21 stsp got clone -q -m -a $testurl/repo $testroot/repo-clone
244 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
245 c8c71e6e 2020-03-21 stsp echo "got clone command failed unexpectedly" >&2
246 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
250 c8c71e6e 2020-03-21 stsp got ref -l -r $testroot/repo-clone > $testroot/stdout
252 c8c71e6e 2020-03-21 stsp echo "HEAD: refs/heads/master" > $testroot/stdout.expected
253 c8c71e6e 2020-03-21 stsp echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
254 c8c71e6e 2020-03-21 stsp echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
255 c8c71e6e 2020-03-21 stsp # refs/hoo/boo/zoo is missing because it is outside of refs/heads
256 c8c71e6e 2020-03-21 stsp echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
258 c8c71e6e 2020-03-21 stsp cmp -s $testroot/stdout $testroot/stdout.expected
260 c8c71e6e 2020-03-21 stsp if [ "$ret" != "0" ]; then
261 c8c71e6e 2020-03-21 stsp diff -u $testroot/stdout.expected $testroot/stdout
263 c8c71e6e 2020-03-21 stsp test_done "$testroot" "$ret"
266 0e4002ca 2020-03-21 stsp function test_clone_reference {
267 0e4002ca 2020-03-21 stsp local testroot=`test_init clone_reference`
268 0e4002ca 2020-03-21 stsp local testurl=ssh://127.0.0.1/$testroot
269 0e4002ca 2020-03-21 stsp local commit_id=`git_show_head $testroot/repo`
271 0e4002ca 2020-03-21 stsp got branch -r $testroot/repo -c $commit_id foo
272 e31abbf2 2020-03-22 stsp got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
273 0e4002ca 2020-03-21 stsp got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
274 0e4002ca 2020-03-21 stsp local tag_id=`got ref -r $testroot/repo -l \
275 0e4002ca 2020-03-21 stsp | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
277 0e4002ca 2020-03-21 stsp got clone -q -R hoo $testurl/repo $testroot/repo-clone
279 0e4002ca 2020-03-21 stsp if [ "$ret" != "0" ]; then
280 0e4002ca 2020-03-21 stsp echo "got clone command failed unexpectedly" >&2
281 0e4002ca 2020-03-21 stsp test_done "$testroot" "$ret"
285 0e4002ca 2020-03-21 stsp got ref -l -r $testroot/repo-clone > $testroot/stdout
287 0e4002ca 2020-03-21 stsp echo "HEAD: refs/heads/master" > $testroot/stdout.expected
288 0e4002ca 2020-03-21 stsp echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
289 f298ae0f 2020-03-25 stsp echo "refs/remotes/origin/HEAD: refs/remotes/origin/master" \
290 f298ae0f 2020-03-25 stsp >> $testroot/stdout.expected
291 0e4002ca 2020-03-21 stsp echo "refs/remotes/origin/hoo/boo/zoo: $commit_id" \
292 0e4002ca 2020-03-21 stsp >> $testroot/stdout.expected
293 0e4002ca 2020-03-21 stsp echo "refs/remotes/origin/master: $commit_id" \
294 0e4002ca 2020-03-21 stsp >> $testroot/stdout.expected
295 0e4002ca 2020-03-21 stsp echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
297 0e4002ca 2020-03-21 stsp cmp -s $testroot/stdout $testroot/stdout.expected
299 0e4002ca 2020-03-21 stsp if [ "$ret" != "0" ]; then
300 0e4002ca 2020-03-21 stsp diff -u $testroot/stdout.expected $testroot/stdout
302 0e4002ca 2020-03-21 stsp test_done "$testroot" "$ret"
305 0e4002ca 2020-03-21 stsp function test_clone_branch_and_reference {
306 0e4002ca 2020-03-21 stsp local testroot=`test_init clone_reference`
307 0e4002ca 2020-03-21 stsp local testurl=ssh://127.0.0.1/$testroot
308 0e4002ca 2020-03-21 stsp local commit_id=`git_show_head $testroot/repo`
310 0e4002ca 2020-03-21 stsp got branch -r $testroot/repo -c $commit_id foo
311 e31abbf2 2020-03-22 stsp got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
312 0e4002ca 2020-03-21 stsp got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
313 0e4002ca 2020-03-21 stsp local tag_id=`got ref -r $testroot/repo -l \
314 0e4002ca 2020-03-21 stsp | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
316 0e4002ca 2020-03-21 stsp got clone -q -R hoo/boo/zoo -b foo $testurl/repo $testroot/repo-clone
318 0e4002ca 2020-03-21 stsp if [ "$ret" != "0" ]; then
319 0e4002ca 2020-03-21 stsp echo "got clone command failed unexpectedly" >&2
320 0e4002ca 2020-03-21 stsp test_done "$testroot" "$ret"
324 0e4002ca 2020-03-21 stsp got ref -l -r $testroot/repo-clone > $testroot/stdout
326 0e4002ca 2020-03-21 stsp echo "HEAD: refs/heads/foo" > $testroot/stdout.expected
327 0e4002ca 2020-03-21 stsp echo "refs/heads/foo: $commit_id" >> $testroot/stdout.expected
328 0e4002ca 2020-03-21 stsp echo "refs/remotes/origin/foo: $commit_id" \
329 0e4002ca 2020-03-21 stsp >> $testroot/stdout.expected
330 0e4002ca 2020-03-21 stsp echo "refs/remotes/origin/hoo/boo/zoo: $commit_id" \
331 0e4002ca 2020-03-21 stsp >> $testroot/stdout.expected
332 0e4002ca 2020-03-21 stsp echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
334 0e4002ca 2020-03-21 stsp cmp -s $testroot/stdout $testroot/stdout.expected
336 0e4002ca 2020-03-21 stsp if [ "$ret" != "0" ]; then
337 0e4002ca 2020-03-21 stsp diff -u $testroot/stdout.expected $testroot/stdout
339 0e4002ca 2020-03-21 stsp test_done "$testroot" "$ret"
342 0e4002ca 2020-03-21 stsp function test_clone_reference_mirror {
343 0e4002ca 2020-03-21 stsp local testroot=`test_init clone_reference_mirror`
344 0e4002ca 2020-03-21 stsp local testurl=ssh://127.0.0.1/$testroot
345 0e4002ca 2020-03-21 stsp local commit_id=`git_show_head $testroot/repo`
347 0e4002ca 2020-03-21 stsp got branch -r $testroot/repo -c $commit_id foo
348 e31abbf2 2020-03-22 stsp got ref -r $testroot/repo -c $commit_id refs/hoo/boo/zoo
349 0e4002ca 2020-03-21 stsp got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
350 0e4002ca 2020-03-21 stsp local tag_id=`got ref -r $testroot/repo -l \
351 0e4002ca 2020-03-21 stsp | grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
353 0e4002ca 2020-03-21 stsp got clone -q -R hoo -m $testurl/repo $testroot/repo-clone
355 0e4002ca 2020-03-21 stsp if [ "$ret" != "0" ]; then
356 0e4002ca 2020-03-21 stsp echo "got clone command failed unexpectedly" >&2
357 0e4002ca 2020-03-21 stsp test_done "$testroot" "$ret"
361 0e4002ca 2020-03-21 stsp got ref -l -r $testroot/repo-clone > $testroot/stdout
363 0e4002ca 2020-03-21 stsp echo "HEAD: refs/heads/master" > $testroot/stdout.expected
364 0e4002ca 2020-03-21 stsp echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
365 0e4002ca 2020-03-21 stsp echo "refs/hoo/boo/zoo: $commit_id" >> $testroot/stdout.expected
366 0e4002ca 2020-03-21 stsp echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
368 0e4002ca 2020-03-21 stsp cmp -s $testroot/stdout $testroot/stdout.expected
370 0e4002ca 2020-03-21 stsp if [ "$ret" != "0" ]; then
371 0e4002ca 2020-03-21 stsp diff -u $testroot/stdout.expected $testroot/stdout
373 0e4002ca 2020-03-21 stsp test_done "$testroot" "$ret"
376 c8c71e6e 2020-03-21 stsp run_test test_clone_basic
377 c8c71e6e 2020-03-21 stsp run_test test_clone_list
378 c8c71e6e 2020-03-21 stsp run_test test_clone_branch
379 c8c71e6e 2020-03-21 stsp run_test test_clone_all
380 c8c71e6e 2020-03-21 stsp run_test test_clone_mirror
381 c8c71e6e 2020-03-21 stsp run_test test_clone_mirror_all
382 0e4002ca 2020-03-21 stsp run_test test_clone_reference
383 0e4002ca 2020-03-21 stsp run_test test_clone_branch_and_reference
384 0e4002ca 2020-03-21 stsp run_test test_clone_reference_mirror