CLEANFILES += nasm-macros.c
EXTRA_DIST += modules/preprocs/nasm/macros.pl \
- modules/preprocs/nasm/standard.mac
+ modules/preprocs/nasm/standard.mac \
+ modules/preprocs/nasm/tests/Makefile.inc
#yasm_nasm_la_LDFLAGS = -module -avoid-version -no-undefined
#yasm_nasm_la_LIBADD = libyasm.la
#YASM_MODULES += -dlopen yasm_nasm.la
+
+include modules/preprocs/nasm/tests/Makefile.inc
* symbol, Here or Base references are valid because we
* are in preprocess-only mode.
*/
- if (!location->known) {
+ if (!location || !location->known) {
error(ERR_NONFATAL,
- "%s not supported in preprocess-only mode",
+ "%s not supported",
(i == TOKEN_ID ? "symbol references" :
i == TOKEN_HERE ? "`$'" : "`$$'"));
addtotemp(EXPR_UNKNOWN, 1L);
--- /dev/null
+# $IdPath$
+
+TESTS += \
+ modules/preprocs/nasm/tests/nasmpp_test.sh
+
+EXTRA_DIST += \
+ modules/preprocs/nasm/tests/nasmpp_test.sh \
+ modules/preprocs/nasm/tests/ifcritical-err.asm \
+ modules/preprocs/nasm/tests/ifcritical-err.errwarn
--- /dev/null
+; This worked under NASM. Due to the once-parse model used by YASM, this no
+; longer works. However, it should error, not crash!
+teststring db "Hello, world"
+teststringlen equ $-teststring
+%if teststringlen>100
+ db '5'
+%endif
--- /dev/null
+-:4: symbol references not supported
+-:4: non-constant value given to `%if'
--- /dev/null
+#! /bin/sh
+# $IdPath$
+${srcdir}/out_test.sh nasmpp_test modules/preprocs/nasm/tests "nasm preproc" "-f bin" ""
+exit $?