File: 09-parallel-siblings-test

package info (click to toggle)
tig 2.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,188 kB
  • sloc: ansic: 36,941; sh: 10,934; makefile: 394
file content (38 lines) | stat: -rwxr-xr-x 811 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
#
# Graph test: parallel siblings

. libtest.sh

test_graph <<EOF
commit A Z B C
    Commit A - merge Z, B, and C
commit B D C
    Commit B - merge D and C
commit D E C
    Commit D - merge C and E
commit E Z
    Commit E - after Z
commit Z Y
    Commit Z - after Y
commit Y X
    Commit Y - after X
commit X W
    Commit X - after W
commit W C
    Commit W - after C
commit C
    Commit C
EOF

assert_equals stdout <<EOF
●─┬─╮ Commit A - merge Z, B, and C
│ ●─│─╮ Commit B - merge D and C
│ ●─│─│─╮ Commit D - merge C and E
│ ∙ │ │ │ Commit E - after Z
∙─╯ │ │ │ Commit Z - after Y
∙ ╭─╯ │ │ Commit Y - after X
∙ │ ╭─╯ │ Commit X - after W
∙ │ │ ╭─╯ Commit W - after C
◎─┴─┴─╯ Commit C
EOF