Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a small test framework and updates all existing tests to use it. Tests are now implemented using shell scripts and integration with the build output is much improved.
- Loading branch information
Showing
65 changed files
with
1,579 additions
and
15,745 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
# | ||
# Graph test: merge from left | ||
|
||
. libtest.sh | ||
|
||
test_graph <<EOF | ||
commit A B C | ||
Commit A - Merge C into B | ||
commit C B D | ||
Commit C - Merge D into B | ||
commit B E | ||
Commit B after E | ||
commit E D | ||
Commit E after D | ||
commit D | ||
Commit D | ||
EOF | ||
|
||
assert_equals stdout <<EOF | ||
●─╮ Commit A - Merge C into B | ||
│ ●─╮ Commit C - Merge D into B | ||
●─╯ │ Commit B after E | ||
● ╭─╯ Commit E after D | ||
◎─╯ Commit D | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
# | ||
# Graph test: duplicate parent | ||
|
||
. libtest.sh | ||
|
||
test_graph <<EOF | ||
commit A B C | ||
Commit A - Merge C into B | ||
commit B C E | ||
Commit B - Merge E into C | ||
commit C D | ||
Commit C after D | ||
commit E D | ||
Commit E after D | ||
commit D F | ||
Commit D after F | ||
commit F G H | ||
Commit F - Merge H into G | ||
commit G H I | ||
Commit G - Merge I into H | ||
commit I H | ||
Commit I after H | ||
commit H | ||
Commit H | ||
EOF | ||
|
||
assert_equals stdout <<EOF | ||
●─╮ Commit A - Merge C into B | ||
●─│─╮ Commit B - Merge E into C | ||
●─╯ │ Commit C after D | ||
│ ●─╯ Commit E after D | ||
●─╯ Commit D after F | ||
●─╮ Commit F - Merge H into G | ||
●─│─╮ Commit G - Merge I into H | ||
│ │ ● Commit I after H | ||
◎─┴─╯ Commit H | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
# | ||
# Graph test: octo merge | ||
|
||
. libtest.sh | ||
|
||
test_graph <<EOF | ||
commit A B C D | ||
Commit A - Merges B, C, and D | ||
commit C E | ||
Commit C after E | ||
commit E D B | ||
Commit E - Merges D and B | ||
commit B D | ||
Commit B after D | ||
commit D | ||
Commit D | ||
EOF | ||
|
||
assert_equals stdout <<EOF | ||
●─┬─╮ Commit A - Merges B, C, and D | ||
│ ● │ Commit C after E | ||
│ ●─│─╮ Commit E - Merges D and B | ||
●─│─│─╯ Commit B after D | ||
◎─┴─╯ Commit D | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
# | ||
# Graph test: missing bar | ||
|
||
. libtest.sh | ||
|
||
test_graph <<EOF | ||
commit A B C | ||
Commit A - Merge B and C | ||
commit B D E | ||
Commit B - Merge D and E | ||
commit C F | ||
Commit C after F | ||
commit F G D | ||
Commit F - Merge G and D | ||
commit D G | ||
Commit D after G | ||
commit G E | ||
Commit G after E | ||
commit E | ||
Commit E | ||
EOF | ||
|
||
assert_equals stdout <<EOF | ||
●─╮ Commit A - Merge B and C | ||
●─│─╮ Commit B - Merge D and E | ||
│ ● │ Commit C after F | ||
│ ●─│─╮ Commit F - Merge G and D | ||
●─│─│─╯ Commit D after G | ||
●─╯ │ Commit G after E | ||
◎───╯ Commit E | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
# | ||
# Graph test: extra pipe | ||
|
||
. libtest.sh | ||
|
||
test_graph <<EOF | ||
commit A B C | ||
Commit A - merge B and C | ||
commit C D | ||
Commit C after D | ||
commit B E D | ||
Commit B - merge E and D | ||
commit D F | ||
Commit D after F | ||
commit E | ||
Commit E | ||
commit F | ||
Commit F | ||
EOF | ||
|
||
assert_equals stdout <<EOF | ||
●─╮ Commit A - merge B and C | ||
│ ● Commit C after D | ||
●─│─╮ Commit B - merge E and D | ||
│ ●─╯ Commit D after F | ||
◎ │ Commit E | ||
◎─╯ Commit F | ||
EOF |
Oops, something went wrong.