aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/t0001-validate-git-versions.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/t0001-validate-git-versions.sh b/tests/t0001-validate-git-versions.sh
index 416ac30..a65b35e 100755
--- a/tests/t0001-validate-git-versions.sh
+++ b/tests/t0001-validate-git-versions.sh
@@ -11,10 +11,15 @@ test_expect_success 'extract Git version from Makefile' '
11 }" ../../Makefile >makefile_version 11 }" ../../Makefile >makefile_version
12' 12'
13 13
14# Note that Git's GIT-VERSION-GEN script applies "s/-/./g" to the version
15# string to produce the internal version in the GIT-VERSION-FILE, so we
16# must apply the same transformation to the version in the Makefile before
17# comparing them.
14test_expect_success 'test Git version matches Makefile' ' 18test_expect_success 'test Git version matches Makefile' '
15 ( cat ../../git/GIT-VERSION-FILE || echo "No GIT-VERSION-FILE" ) | 19 ( cat ../../git/GIT-VERSION-FILE || echo "No GIT-VERSION-FILE" ) |
16 sed -e "s/GIT_VERSION[ ]*=[ ]*//" -e "s/\\.dirty$//" >git_version && 20 sed -e "s/GIT_VERSION[ ]*=[ ]*//" -e "s/\\.dirty$//" >git_version &&
17 test_cmp git_version makefile_version 21 sed -e "s/-/./g" makefile_version >makefile_git_version &&
22 test_cmp git_version makefile_git_version
18' 23'
19 24
20test_expect_success 'test submodule version matches Makefile' ' 25test_expect_success 'test submodule version matches Makefile' '