shithub: rgbds

Download patch

ref: bf789dd7b3d0ed655f5e071f0b67ba5114d4b8e3
parent: 9b6f01047c4329186375727290f9fe8380e0609b
author: ISSOtm <eldredhabert0@gmail.com>
date: Thu Dec 10 07:22:29 EST 2020

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...

--- a/test/asm/.gitignore
+++ b/test/asm/.gitignore
@@ -1,1 +1,2 @@
 quote\"file.*
+version.out
--- a/test/asm/test.sh
+++ b/test/asm/test.sh
@@ -22,6 +22,9 @@
 	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
--- a/test/asm/version.asm
+++ b/test/asm/version.asm
@@ -1,1 +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"
--- a/test/asm/version.out
+++ /dev/null
@@ -1,1 +1,0 @@
-RGBDS version 0.4.2