diff options
author | Antonin Delpeuch <antonin@delpeuch.eu> | 2023-09-20 10:20:20 +0200 |
---|---|---|
committer | Antonin Delpeuch <antonin@delpeuch.eu> | 2023-09-20 10:29:27 +0200 |
commit | b268b72533c805be8da82c728d3c8e9f6249cf23 (patch) | |
tree | deebc34b0a85a8b517a6d017d93466db83dbac0e /tests/self_test.sh | |
parent | 922f5d08b841557856ff82cae5f72c156bef77d1 (diff) | |
download | git-deps-b268b72533c805be8da82c728d3c8e9f6249cf23.tar.gz |
Start test suite of running git-deps on itself
For #4.
Diffstat (limited to 'tests/self_test.sh')
-rwxr-xr-x | tests/self_test.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/self_test.sh b/tests/self_test.sh new file mode 100755 index 0000000..c2ddfb1 --- /dev/null +++ b/tests/self_test.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -eo pipefail + +# Collection of tests consisting in running `git-deps` on its own repository. +# The expected outputs of various commands are stored in the `expected_outputs` subdirectory. + +# Because git-deps can only be run from the repository's root, this script should be run at +# the root of a clone of git-deps. The clone should not be shallow, so that all refs can be accessed. + +echo "Running test suite" + +echo "* Dependencies of 4f27a1e, a regular commit" +git-deps 4f27a1e^! | sort | diff tests/expected_outputs/deps_4f27a1e - + +echo "* Dependencies of 1ba7ad5, a merge commit" +git-deps 1ba7ad5^! | sort | diff tests/expected_outputs/deps_1ba7ad5 - + +# Currently failing: +#echo "* Dependencies of the root commit" +# git-deps b196757^! | sort # | diff tests/expected_outputs/deps_b196757 - + +echo "All tests passed!" |