chiark / gitweb /
test suite: Always pass LC_COLLATE=C to sort(1).
[dgit.git] / tests / tests / checkout
1 #!/bin/bash
2 set -e
3 . tests/lib
4 t-tstunt-parsechangelog
5
6 t-setup-import examplegit
7
8 p=example
9
10 mkdir $p.2
11 cd $p.2
12
13 git init
14 t-dgit setup-new-tree
15 t-dgit checkout -p $p unstable
16
17 t-refs-same-start
18 t-ref-head
19 t-ref-same refs/tags/test-dummy/$v
20
21 t-dgit checkout -p $p stable
22
23 t-dgit checkout -d no-such-distro sid
24 t-ref-head
25
26 t-dgit checkout stable
27
28 git branch -D dgit/sid
29 t-dgit checkout -d no-such-distro sid
30 t-ref-head
31
32 git reflog --pretty=tformat:%gs >../reflog.got
33 cat >../reflog.expect <<END
34 dgit checkout sid
35 dgit checkout stable
36 dgit checkout sid
37 dgit checkout stable
38 dgit checkout unstable
39 END
40 diff -u ../reflog.{expect,got}
41
42 git for-each-ref --format='%(refname)' refs/heads | t-sort >../refs.got
43 cat >../refs.expect <<END
44 refs/heads/dgit/sid
45 refs/heads/dgit/stable
46 END
47 diff -u ../refs.{expect,got}
48
49 t-ok