nasm/travis/defalias/defalias.asm
H. Peter Anvin (Intel) 7f69cf689c travis: reorganize directories, add tests from the test/ directory
This is a mostly automated, partially AI-assisted migration of tests
from the test/ directory into the travis framework.

Running tests manually in the test/ directory is still supported, but
move common include files into travis/test and add a default -I option
to Makefile.in in the test/ directory.

The incbin test fails for pre-existing reasons; for now it contains an
stderr file with the errors. The problem is that INCBIN is both a
macro and a special instruction (not even a directive...), but there
currently is no way to handle prefixes, *especially* TIMES, in
multi-line macros. This is a separate problem and needs to be dealt
with as such.

Reorganize the travis directory so that each test or collection of
tests are in a separate subdirectory of travis/, and travis itself
lives in tools/travis to avoid creating deeper paths.

Add support for recording compression options in the travis .json
files, so that compressed files can be recreated with the same
options: because of the generally repetitive nature of the binary
output test files, the parameters used for xz compression can matter
enormously.

These are combined into a single huge commit to avoid adding large
binary files into the repository that then would immediately be
obsoleted, but still retained in git.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2026-06-30 20:54:46 -07:00

52 lines
941 B
NASM

%defalias foo bar
%ifdef foo
%error "foo should not be defined here!"
%endif
%define foo 33
%ifndef foo
%error "foo should be defined here!"
%endif
%ifndef bar
%error "bar should be defined here!"
%endif
%if bar != 33
%error "bar should have the value 33 here"
%endif
%define bar 34
%if foo != 34
%error "foo should have the value 34 here"
%endif
%undef foo
%ifdef foo
%error "foo should not be defined here!"
%endif
%ifdef bar
%error "bar should not be defined here!"
%endif
%ifndefalias foo
%error "foo was removed as an alias!"
%endif
%define bar 35
%if foo != 35
%error "foo should have the value 35 here"
%endif
%define foo 36
%if bar != 36
%error "bar should have the value 36 here"
%endif
%undefalias foo
%ifdef foo
%error "foo is still defined after %undefalias"
%elifdefalias foo
%error "foo is undefined, but still an alias"
%endif
%ifndef bar
%error "bar disappeared after %undefalias foo"
%endif