Add automated test for version consistency

Automatically check that the version number constants
(__RGBDS_MAJOR__ etc.) match `rgbasm -V`
Should avoid the problem with 0.4.2's release...
This commit is contained in:
ISSOtm
2020-12-10 12:22:29 +01:00
parent 9b6f01047c
commit bf789dd7b3
4 changed files with 5 additions and 2 deletions

1
test/asm/.gitignore vendored
View File

@@ -1 +1,2 @@
quote\"file.*
version.out

View File

@@ -22,6 +22,9 @@ tryCmp () {
cmp $1 $2 || (../../contrib/gbdiff.bash $1 $2; echo "${bold}${red}${i%.asm}${variant}.out.bin mismatch!${rescolors}${resbold}"; false)
}
# Add the version constants test, outputting the closest tag to the HEAD
git describe --tags --abbrev=0 > version.out
# Add the quote test, except on Windows
if uname | grep -viq mingw; then
cat > quote\"file.asm <<EOF

View File

@@ -1 +1 @@
PRINTT "RGBDS version {d:__RGBDS_MAJOR__}.{d:__RGBDS_MINOR__}.{d:__RGBDS_PATCH__}\n"
PRINTT "v{d:__RGBDS_MAJOR__}.{d:__RGBDS_MINOR__}.{d:__RGBDS_PATCH__}\n"

View File

@@ -1 +0,0 @@
RGBDS version 0.4.2