tests: move test_cmp_rev to test-lib-functions
A function for checking that two given parameters refer to the same revision was defined in several places, so move the definition to test-lib-functions.sh instead. Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b3cf6f3b8d
commit
5d77298d08
@ -602,6 +602,13 @@ test_cmp() {
|
||||
$GIT_TEST_CMP "$@"
|
||||
}
|
||||
|
||||
# Tests that its two parameters refer to the same revision
|
||||
test_cmp_rev () {
|
||||
git rev-parse --verify "$1" >expect.rev &&
|
||||
git rev-parse --verify "$2" >actual.rev &&
|
||||
test_cmp expect.rev actual.rev
|
||||
}
|
||||
|
||||
# Print a sequence of numbers or letters in increasing order. This is
|
||||
# similar to GNU seq(1), but the latter might not be available
|
||||
# everywhere (and does not do letters). It may be used like:
|
||||
|
Reference in New Issue
Block a user