3 dc5351b4 2019-07-30 stsp # Copyright (c) 2019 Stefan Sperling <stsp@openbsd.org>
5 dc5351b4 2019-07-30 stsp # Permission to use, copy, modify, and distribute this software for any
6 dc5351b4 2019-07-30 stsp # purpose with or without fee is hereby granted, provided that the above
7 dc5351b4 2019-07-30 stsp # copyright notice and this permission notice appear in all copies.
9 dc5351b4 2019-07-30 stsp # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 dc5351b4 2019-07-30 stsp # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 dc5351b4 2019-07-30 stsp # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 dc5351b4 2019-07-30 stsp # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 dc5351b4 2019-07-30 stsp # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 dc5351b4 2019-07-30 stsp # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 dc5351b4 2019-07-30 stsp # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 dc5351b4 2019-07-30 stsp . ./common.sh
19 dc5351b4 2019-07-30 stsp function test_branch_create {
20 dc5351b4 2019-07-30 stsp local testroot=`test_init branch_create`
21 da76fce2 2020-02-24 stsp local commit_id0=`git_show_head $testroot/repo`
23 dc5351b4 2019-07-30 stsp # Create a branch based on repository's HEAD reference
24 dc5351b4 2019-07-30 stsp got branch -r $testroot/repo newbranch
26 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
27 dc5351b4 2019-07-30 stsp echo "got branch command failed unexpectedly"
28 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
32 dc5351b4 2019-07-30 stsp # Ensure that Git recognizes the branch Got has created
33 dc5351b4 2019-07-30 stsp (cd $testroot/repo && git checkout -q newbranch)
35 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
36 dc5351b4 2019-07-30 stsp echo "git checkout command failed unexpectedly"
37 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
40 dc5351b4 2019-07-30 stsp echo "modified delta on branch" > $testroot/repo/gamma/delta
41 dc5351b4 2019-07-30 stsp git_commit $testroot/repo -m "committing to delta on newbranch"
43 dc5351b4 2019-07-30 stsp got checkout -b newbranch $testroot/repo $testroot/wt >/dev/null
45 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
46 dc5351b4 2019-07-30 stsp echo "got checkout command failed unexpectedly"
47 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
51 dc5351b4 2019-07-30 stsp echo "modified delta on branch" > $testroot/content.expected
52 dc5351b4 2019-07-30 stsp cat $testroot/wt/gamma/delta > $testroot/content
53 dc5351b4 2019-07-30 stsp cmp -s $testroot/content.expected $testroot/content
55 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
56 dc5351b4 2019-07-30 stsp diff -u $testroot/content.expected $testroot/content
57 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
61 dc5351b4 2019-07-30 stsp # Create a branch based on the work tree's branch
62 da76fce2 2020-02-24 stsp (cd $testroot/wt && got branch -n anotherbranch)
64 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
65 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
69 dc5351b4 2019-07-30 stsp (cd $testroot/repo && git checkout -q anotherbranch)
71 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
72 dc5351b4 2019-07-30 stsp echo "git checkout command failed unexpectedly"
73 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
77 dc5351b4 2019-07-30 stsp # Create a branch based on another specific branch
78 da76fce2 2020-02-24 stsp (cd $testroot/wt && got branch -n -c master yetanotherbranch)
80 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
81 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
85 dc5351b4 2019-07-30 stsp (cd $testroot/repo && git checkout -q yetanotherbranch)
87 a4f89d48 2019-08-25 stsp if [ "$ret" != "0" ]; then
88 a4f89d48 2019-08-25 stsp echo "git checkout command failed unexpectedly"
89 a4f89d48 2019-08-25 stsp test_done "$testroot" "$ret"
93 a4f89d48 2019-08-25 stsp # Create a branch based on a specific commit
94 a4f89d48 2019-08-25 stsp local commit_id=`git_show_head $testroot/repo`
95 a74f7e83 2019-11-10 stsp got branch -r $testroot/repo -c $commit_id commitbranch
97 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
98 a4f89d48 2019-08-25 stsp echo "got branch command failed unexpectedly"
99 a4f89d48 2019-08-25 stsp test_done "$testroot" "$ret"
103 a4f89d48 2019-08-25 stsp (cd $testroot/repo && git checkout -q commitbranch)
105 a4f89d48 2019-08-25 stsp if [ "$ret" != "0" ]; then
106 dc5351b4 2019-07-30 stsp echo "git checkout command failed unexpectedly"
107 da76fce2 2020-02-24 stsp test_done "$testroot" "$ret"
111 da76fce2 2020-02-24 stsp # Create a branch and let the work tree be updated to it
112 da76fce2 2020-02-24 stsp (cd $testroot/wt && got branch -c $commit_id0 updatebranch \
113 da76fce2 2020-02-24 stsp > $testroot/stdout)
115 da76fce2 2020-02-24 stsp echo -n "Switching work tree from refs/heads/newbranch to " \
116 da76fce2 2020-02-24 stsp > $testroot/stdout.expected
117 da76fce2 2020-02-24 stsp echo "refs/heads/updatebranch" >> $testroot/stdout.expected
118 da76fce2 2020-02-24 stsp echo "U gamma/delta" >> $testroot/stdout.expected
119 da76fce2 2020-02-24 stsp echo "Updated to commit $commit_id0" >> $testroot/stdout.expected
121 da76fce2 2020-02-24 stsp cmp -s $testroot/stdout.expected $testroot/stdout
123 da76fce2 2020-02-24 stsp if [ "$ret" != "0" ]; then
124 da76fce2 2020-02-24 stsp diff -u $testroot/stdout.expected $testroot/stdout
126 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
129 dc5351b4 2019-07-30 stsp function test_branch_list {
130 dc5351b4 2019-07-30 stsp local testroot=`test_init branch_list`
131 dc5351b4 2019-07-30 stsp local commit_id=`git_show_head $testroot/repo`
133 dc5351b4 2019-07-30 stsp for b in branch1 branch2 branch3; do
134 dc5351b4 2019-07-30 stsp got branch -r $testroot/repo $b
136 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
137 dc5351b4 2019-07-30 stsp echo "got branch command failed unexpectedly"
138 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
143 dc5351b4 2019-07-30 stsp got branch -l -r $testroot/repo > $testroot/stdout
144 dc5351b4 2019-07-30 stsp echo " branch1: $commit_id" > $testroot/stdout.expected
145 dc5351b4 2019-07-30 stsp echo " branch2: $commit_id" >> $testroot/stdout.expected
146 dc5351b4 2019-07-30 stsp echo " branch3: $commit_id" >> $testroot/stdout.expected
147 dc5351b4 2019-07-30 stsp echo " master: $commit_id" >> $testroot/stdout.expected
148 dc5351b4 2019-07-30 stsp cmp -s $testroot/stdout $testroot/stdout.expected
150 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
151 dc5351b4 2019-07-30 stsp diff -u $testroot/stdout.expected $testroot/stdout
152 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
156 dc5351b4 2019-07-30 stsp got checkout $testroot/repo $testroot/wt >/dev/null
158 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
159 dc5351b4 2019-07-30 stsp echo "got checkout command failed unexpectedly"
160 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
164 dc5351b4 2019-07-30 stsp (cd $testroot/wt && got branch -l > $testroot/stdout)
165 dc5351b4 2019-07-30 stsp echo " branch1: $commit_id" > $testroot/stdout.expected
166 dc5351b4 2019-07-30 stsp echo " branch2: $commit_id" >> $testroot/stdout.expected
167 dc5351b4 2019-07-30 stsp echo " branch3: $commit_id" >> $testroot/stdout.expected
168 dc5351b4 2019-07-30 stsp echo "* master: $commit_id" >> $testroot/stdout.expected
169 dc5351b4 2019-07-30 stsp cmp -s $testroot/stdout $testroot/stdout.expected
171 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
172 dc5351b4 2019-07-30 stsp diff -u $testroot/stdout.expected $testroot/stdout
173 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
177 dc5351b4 2019-07-30 stsp echo "modified delta" > $testroot/repo/gamma/delta
178 dc5351b4 2019-07-30 stsp git_commit $testroot/repo -m "committing to delta"
179 dc5351b4 2019-07-30 stsp local commit_id2=`git_show_head $testroot/repo`
181 dc5351b4 2019-07-30 stsp (cd $testroot/wt && got branch -l > $testroot/stdout)
182 dc5351b4 2019-07-30 stsp echo " branch1: $commit_id" > $testroot/stdout.expected
183 dc5351b4 2019-07-30 stsp echo " branch2: $commit_id" >> $testroot/stdout.expected
184 dc5351b4 2019-07-30 stsp echo " branch3: $commit_id" >> $testroot/stdout.expected
185 dc5351b4 2019-07-30 stsp echo "~ master: $commit_id2" >> $testroot/stdout.expected
186 dc5351b4 2019-07-30 stsp cmp -s $testroot/stdout $testroot/stdout.expected
188 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
189 dc5351b4 2019-07-30 stsp diff -u $testroot/stdout.expected $testroot/stdout
190 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
194 dc5351b4 2019-07-30 stsp (cd $testroot/wt && got update > /dev/null)
196 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
197 dc5351b4 2019-07-30 stsp echo "got update command failed unexpectedly"
198 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
202 dc5351b4 2019-07-30 stsp (cd $testroot/wt && got branch -l > $testroot/stdout)
203 dc5351b4 2019-07-30 stsp echo " branch1: $commit_id" > $testroot/stdout.expected
204 dc5351b4 2019-07-30 stsp echo " branch2: $commit_id" >> $testroot/stdout.expected
205 dc5351b4 2019-07-30 stsp echo " branch3: $commit_id" >> $testroot/stdout.expected
206 dc5351b4 2019-07-30 stsp echo "* master: $commit_id2" >> $testroot/stdout.expected
207 dc5351b4 2019-07-30 stsp cmp -s $testroot/stdout $testroot/stdout.expected
209 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
210 dc5351b4 2019-07-30 stsp diff -u $testroot/stdout.expected $testroot/stdout
211 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
215 dc5351b4 2019-07-30 stsp (cd $testroot/wt && got update -b branch1 > /dev/null)
217 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
218 dc5351b4 2019-07-30 stsp echo "got update command failed unexpectedly"
219 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
223 dc5351b4 2019-07-30 stsp (cd $testroot/wt && got branch -l > $testroot/stdout)
224 dc5351b4 2019-07-30 stsp echo "* branch1: $commit_id" > $testroot/stdout.expected
225 dc5351b4 2019-07-30 stsp echo " branch2: $commit_id" >> $testroot/stdout.expected
226 dc5351b4 2019-07-30 stsp echo " branch3: $commit_id" >> $testroot/stdout.expected
227 dc5351b4 2019-07-30 stsp echo " master: $commit_id2" >> $testroot/stdout.expected
228 dc5351b4 2019-07-30 stsp cmp -s $testroot/stdout $testroot/stdout.expected
230 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
231 dc5351b4 2019-07-30 stsp diff -u $testroot/stdout.expected $testroot/stdout
233 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
236 dc5351b4 2019-07-30 stsp function test_branch_delete {
237 dc5351b4 2019-07-30 stsp local testroot=`test_init branch_delete`
238 dc5351b4 2019-07-30 stsp local commit_id=`git_show_head $testroot/repo`
240 dc5351b4 2019-07-30 stsp for b in branch1 branch2 branch3; do
241 dc5351b4 2019-07-30 stsp got branch -r $testroot/repo $b
243 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
244 dc5351b4 2019-07-30 stsp echo "got branch command failed unexpectedly"
245 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
250 dc5351b4 2019-07-30 stsp got branch -d branch2 -r $testroot/repo > $testroot/stdout
252 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
253 dc5351b4 2019-07-30 stsp echo "got update command failed unexpectedly"
254 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
258 dc5351b4 2019-07-30 stsp got branch -l -r $testroot/repo > $testroot/stdout
259 dc5351b4 2019-07-30 stsp echo " branch1: $commit_id" > $testroot/stdout.expected
260 dc5351b4 2019-07-30 stsp echo " branch3: $commit_id" >> $testroot/stdout.expected
261 dc5351b4 2019-07-30 stsp echo " master: $commit_id" >> $testroot/stdout.expected
262 6aeab596 2019-08-28 stsp cmp -s $testroot/stdout $testroot/stdout.expected
264 6aeab596 2019-08-28 stsp if [ "$ret" != "0" ]; then
265 6aeab596 2019-08-28 stsp diff -u $testroot/stdout.expected $testroot/stdout
266 6aeab596 2019-08-28 stsp test_done "$testroot" "$ret"
270 6aeab596 2019-08-28 stsp got ref -l -r $testroot/repo > $testroot/stdout
271 6aeab596 2019-08-28 stsp echo "HEAD: refs/heads/master" > $testroot/stdout.expected
272 6aeab596 2019-08-28 stsp echo "refs/heads/branch1: $commit_id" >> $testroot/stdout.expected
273 6aeab596 2019-08-28 stsp echo "refs/heads/branch3: $commit_id" >> $testroot/stdout.expected
274 6aeab596 2019-08-28 stsp echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
275 dc5351b4 2019-07-30 stsp cmp -s $testroot/stdout $testroot/stdout.expected
277 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
278 dc5351b4 2019-07-30 stsp diff -u $testroot/stdout.expected $testroot/stdout
279 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
283 dc5351b4 2019-07-30 stsp got branch -d bogus_branch_name -r $testroot/repo \
284 dc5351b4 2019-07-30 stsp > $testroot/stdout 2> $testroot/stderr
286 dc5351b4 2019-07-30 stsp if [ "$ret" == "0" ]; then
287 dc5351b4 2019-07-30 stsp echo "got update succeeded unexpectedly"
288 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
292 dc5351b4 2019-07-30 stsp echo "got: reference refs/heads/bogus_branch_name not found" \
293 dc5351b4 2019-07-30 stsp > $testroot/stderr.expected
294 dc5351b4 2019-07-30 stsp cmp -s $testroot/stderr $testroot/stderr.expected
296 dc5351b4 2019-07-30 stsp if [ "$ret" != "0" ]; then
297 dc5351b4 2019-07-30 stsp diff -u $testroot/stderr.expected $testroot/stderr
299 dc5351b4 2019-07-30 stsp test_done "$testroot" "$ret"
302 45cd4e47 2019-08-25 stsp function test_branch_delete_current_branch {
303 45cd4e47 2019-08-25 stsp local testroot=`test_init branch_delete_current_branch`
304 45cd4e47 2019-08-25 stsp local commit_id=`git_show_head $testroot/repo`
306 45cd4e47 2019-08-25 stsp got checkout $testroot/repo $testroot/wt >/dev/null
308 45cd4e47 2019-08-25 stsp if [ "$ret" != "0" ]; then
309 45cd4e47 2019-08-25 stsp echo "got checkout command failed unexpectedly"
310 45cd4e47 2019-08-25 stsp test_done "$testroot" "$ret"
314 45cd4e47 2019-08-25 stsp (cd $testroot/wt && got branch -d master > $testroot/stdout \
315 45cd4e47 2019-08-25 stsp 2> $testroot/stderr)
317 45cd4e47 2019-08-25 stsp echo "got: will not delete this work tree's current branch" \
318 6aeab596 2019-08-28 stsp > $testroot/stderr.expected
319 6aeab596 2019-08-28 stsp cmp -s $testroot/stderr $testroot/stderr.expected
321 6aeab596 2019-08-28 stsp if [ "$ret" != "0" ]; then
322 6aeab596 2019-08-28 stsp diff -u $testroot/stderr.expected $testroot/stderr
324 6aeab596 2019-08-28 stsp test_done "$testroot" "$ret"
327 6aeab596 2019-08-28 stsp function test_branch_delete_packed {
328 6aeab596 2019-08-28 stsp local testroot=`test_init branch_delete_packed`
329 6aeab596 2019-08-28 stsp local commit_id=`git_show_head $testroot/repo`
331 6aeab596 2019-08-28 stsp for b in branch1 branch2 branch3; do
332 6aeab596 2019-08-28 stsp got branch -r $testroot/repo $b
334 6aeab596 2019-08-28 stsp if [ "$ret" != "0" ]; then
335 6aeab596 2019-08-28 stsp echo "got branch command failed unexpectedly"
336 6aeab596 2019-08-28 stsp test_done "$testroot" "$ret"
341 6aeab596 2019-08-28 stsp (cd $testroot/repo && git pack-refs --all)
343 6aeab596 2019-08-28 stsp got branch -d branch2 -r $testroot/repo > $testroot/stdout
345 6aeab596 2019-08-28 stsp if [ "$ret" != "0" ]; then
346 6aeab596 2019-08-28 stsp echo "got update command failed unexpectedly"
347 6aeab596 2019-08-28 stsp test_done "$testroot" "$ret"
351 6aeab596 2019-08-28 stsp got branch -l -r $testroot/repo > $testroot/stdout
352 6aeab596 2019-08-28 stsp echo " branch1: $commit_id" > $testroot/stdout.expected
353 6aeab596 2019-08-28 stsp echo " branch3: $commit_id" >> $testroot/stdout.expected
354 6aeab596 2019-08-28 stsp echo " master: $commit_id" >> $testroot/stdout.expected
355 6aeab596 2019-08-28 stsp cmp -s $testroot/stdout $testroot/stdout.expected
357 6aeab596 2019-08-28 stsp if [ "$ret" != "0" ]; then
358 6aeab596 2019-08-28 stsp diff -u $testroot/stdout.expected $testroot/stdout
359 6aeab596 2019-08-28 stsp test_done "$testroot" "$ret"
363 6aeab596 2019-08-28 stsp got ref -l -r $testroot/repo > $testroot/stdout
364 6aeab596 2019-08-28 stsp echo "HEAD: refs/heads/master" > $testroot/stdout.expected
365 6aeab596 2019-08-28 stsp echo "refs/heads/branch1: $commit_id" >> $testroot/stdout.expected
366 6aeab596 2019-08-28 stsp echo "refs/heads/branch3: $commit_id" >> $testroot/stdout.expected
367 6aeab596 2019-08-28 stsp echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
368 6aeab596 2019-08-28 stsp cmp -s $testroot/stdout $testroot/stdout.expected
370 6aeab596 2019-08-28 stsp if [ "$ret" != "0" ]; then
371 6aeab596 2019-08-28 stsp diff -u $testroot/stdout.expected $testroot/stdout
372 6aeab596 2019-08-28 stsp test_done "$testroot" "$ret"
376 6aeab596 2019-08-28 stsp got branch -d bogus_branch_name -r $testroot/repo \
377 6aeab596 2019-08-28 stsp > $testroot/stdout 2> $testroot/stderr
379 6aeab596 2019-08-28 stsp if [ "$ret" == "0" ]; then
380 6aeab596 2019-08-28 stsp echo "got update succeeded unexpectedly"
381 6aeab596 2019-08-28 stsp test_done "$testroot" "$ret"
385 6aeab596 2019-08-28 stsp echo "got: reference refs/heads/bogus_branch_name not found" \
386 45cd4e47 2019-08-25 stsp > $testroot/stderr.expected
387 45cd4e47 2019-08-25 stsp cmp -s $testroot/stderr $testroot/stderr.expected
389 45cd4e47 2019-08-25 stsp if [ "$ret" != "0" ]; then
390 45cd4e47 2019-08-25 stsp diff -u $testroot/stderr.expected $testroot/stderr
392 ad89fa31 2019-10-04 stsp test_done "$testroot" "$ret"
395 ad89fa31 2019-10-04 stsp function test_branch_show {
396 ad89fa31 2019-10-04 stsp local testroot=`test_init branch_show`
397 ad89fa31 2019-10-04 stsp local commit_id=`git_show_head $testroot/repo`
399 ad89fa31 2019-10-04 stsp for b in branch1 branch2 branch3; do
400 ad89fa31 2019-10-04 stsp got branch -r $testroot/repo $b
402 ad89fa31 2019-10-04 stsp if [ "$ret" != "0" ]; then
403 ad89fa31 2019-10-04 stsp echo "got branch command failed unexpectedly"
404 ad89fa31 2019-10-04 stsp test_done "$testroot" "$ret"
409 ad89fa31 2019-10-04 stsp got checkout $testroot/repo $testroot/wt >/dev/null
411 ad89fa31 2019-10-04 stsp if [ "$ret" != "0" ]; then
412 ad89fa31 2019-10-04 stsp echo "got checkout command failed unexpectedly"
413 ad89fa31 2019-10-04 stsp test_done "$testroot" "$ret"
417 ad89fa31 2019-10-04 stsp (cd $testroot/wt && got branch > $testroot/stdout)
418 ad89fa31 2019-10-04 stsp echo "master" > $testroot/stdout.expected
419 ad89fa31 2019-10-04 stsp cmp -s $testroot/stdout $testroot/stdout.expected
421 ad89fa31 2019-10-04 stsp if [ "$ret" != "0" ]; then
422 ad89fa31 2019-10-04 stsp diff -u $testroot/stdout.expected $testroot/stdout
423 ad89fa31 2019-10-04 stsp test_done "$testroot" "$ret"
427 ad89fa31 2019-10-04 stsp (cd $testroot/wt && got update -b branch1 > /dev/null)
429 ad89fa31 2019-10-04 stsp if [ "$ret" != "0" ]; then
430 ad89fa31 2019-10-04 stsp echo "got update command failed unexpectedly"
431 ad89fa31 2019-10-04 stsp test_done "$testroot" "$ret"
435 ad89fa31 2019-10-04 stsp (cd $testroot/wt && got branch > $testroot/stdout)
436 ad89fa31 2019-10-04 stsp echo "branch1" > $testroot/stdout.expected
437 ad89fa31 2019-10-04 stsp cmp -s $testroot/stdout $testroot/stdout.expected
439 ad89fa31 2019-10-04 stsp if [ "$ret" != "0" ]; then
440 ad89fa31 2019-10-04 stsp diff -u $testroot/stdout.expected $testroot/stdout
442 45cd4e47 2019-08-25 stsp test_done "$testroot" "$ret"
446 dc5351b4 2019-07-30 stsp run_test test_branch_create
447 dc5351b4 2019-07-30 stsp run_test test_branch_list
448 dc5351b4 2019-07-30 stsp run_test test_branch_delete
449 45cd4e47 2019-08-25 stsp run_test test_branch_delete_current_branch
450 6aeab596 2019-08-28 stsp run_test test_branch_delete_packed
451 ad89fa31 2019-10-04 stsp run_test test_branch_show