diff --git a/test/asm/.gitignore b/test/asm/.gitignore index ae8c65ea..c6f749bf 100644 --- a/test/asm/.gitignore +++ b/test/asm/.gitignore @@ -1,2 +1,3 @@ -quote\"file.* -version.out +/quote\"file.* +/version.asm +/version.out diff --git a/test/asm/test.sh b/test/asm/test.sh index 12634c95..2e734867 100755 --- a/test/asm/test.sh +++ b/test/asm/test.sh @@ -2,18 +2,19 @@ export LC_ALL=C -o=$(mktemp) -gb=$(mktemp) -input=$(mktemp) -output=$(mktemp) -errput=$(mktemp) +o="$(mktemp)" +gb="$(mktemp)" +input="$(mktemp)" +output="$(mktemp)" +errput="$(mktemp)" rc=0 -bold=$(tput bold) -resbold=$(tput sgr0) -red=$(tput setaf 1) -green=$(tput setaf 2) -rescolors=$(tput op) +bold="$(tput bold)" +resbold="$(tput sgr0)" +red="$(tput setaf 1)" +green="$(tput setaf 2)" +orange="$(tput setaf 3)" +rescolors="$(tput op)" tryDiff () { diff -u --strip-trailing-cr $1 $2 || (echo "${bold}${red}${i%.asm}${variant}.$3 mismatch!${rescolors}${resbold}"; false) } @@ -23,7 +24,13 @@ tryCmp () { } # Add the version constants test, outputting the closest tag to the HEAD -git describe --tags --abbrev=0 > version.out +if git describe --tags --abbrev=0 > version.out; then + cat > version.asm < $output 2> $errput desired_output=${i%.asm}.out diff --git a/test/asm/version.asm b/test/asm/version.asm deleted file mode 100644 index 49001766..00000000 --- a/test/asm/version.asm +++ /dev/null @@ -1 +0,0 @@ -PRINTT "v{d:__RGBDS_MAJOR__}.{d:__RGBDS_MINOR__}.{d:__RGBDS_PATCH__}\n"