#!/bin/sh
#
# Graph test: shorter merge than branch

. libtest.sh

test_graph <<EOF
commit A H B C D J E
    Commit A - merge H, B, C, D, and E
commit B K
    Commit B - after K
commit C H
    Commit C - after H
commit J I
    Commit J - after I
commit D K
    Commit D - after K
commit E F
    Commit E - after F
commit K F
    Commit K - after F
commit F G H
    Commit F - merge G and H
commit G I
    Commit G - after I
commit H I
    Commit H - after I
commit I
    Commit I
EOF

assert_equals stdout <<EOF
●─┬─┬─┬─┬─╮ Commit A - merge H, B, C, D, and E
│ ∙ │ │ │ │ Commit B - after K
│ │ ∙ │ │ │ Commit C - after H
│ │ │ │ ∙ │ Commit J - after I
│ │ │ ∙ │ │ Commit D - after K
│ │ │ │ │ ∙ Commit E - after F
│ ∙─│─╯ │ │ Commit K - after F
│ ●─│─╭─╯─┤ Commit F - merge G and H
│ ∙ │ │ ╭─╯ Commit G - after I
∙─│─┴─│─╯ Commit H - after I
◎─┴───╯ Commit I
EOF
