travis: add selfref

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2020-10-11 12:50:08 +03:00
parent 985f30df21
commit 62b8ea045c
3 changed files with 39 additions and 0 deletions

24
travis/test/selfref.asm Normal file
View File

@ -0,0 +1,24 @@
bits 32
%idefine zoom $%?
mov ebx,Zoom
%idefine boom $%?
mov ecx,Boom
%imacro Foo1 0
%idefine Bar1 _%?
%idefine baz1 $%?
mov BAR1,baz1
%endmacro
foo1
mov eax,bar1
%imacro Foo2 0
%idefine Bar2 _%*?
%idefine baz2 $%*?
mov BAR2,baz2
%endmacro
foo2
mov eax,bar2

13
travis/test/selfref.json Normal file
View File

@ -0,0 +1,13 @@
[
{
"description": "Test self reference macro",
"id": "selfref",
"format": "bin",
"source": "selfref.asm",
"option": "-Ox",
"target": [
{ "stderr": "selfref.stderr" }
],
"error": "expected"
}
]

View File

@ -0,0 +1,2 @@
./travis/test/selfref.asm:23: error: comma, colon, decorator or end of line expected after operand
./travis/test/selfref.asm:20: ... from macro `Foo2' defined here