aboutsummaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2020-10-11 12:50:08 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2020-10-11 12:50:08 +0300
commit62b8ea045cc4e0e3d80d0e73479f51f73205b068 (patch)
treecb217fb05e1a54108c6d0936683cbcd3789ff7ce /travis
parent985f30df2137c9bbe066fbe1bfed49184ab3b318 (diff)
downloadnasm-62b8ea045cc4e0e3d80d0e73479f51f73205b068.tar.gz
nasm-62b8ea045cc4e0e3d80d0e73479f51f73205b068.tar.xz
nasm-62b8ea045cc4e0e3d80d0e73479f51f73205b068.zip
travis: add selfref
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis')
-rw-r--r--travis/test/selfref.asm24
-rw-r--r--travis/test/selfref.json13
-rw-r--r--travis/test/selfref.stderr2
3 files changed, 39 insertions, 0 deletions
diff --git a/travis/test/selfref.asm b/travis/test/selfref.asm
new file mode 100644
index 00000000..90ecef06
--- /dev/null
+++ b/travis/test/selfref.asm
@@ -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
diff --git a/travis/test/selfref.json b/travis/test/selfref.json
new file mode 100644
index 00000000..dd2c8d3a
--- /dev/null
+++ b/travis/test/selfref.json
@@ -0,0 +1,13 @@
+[
+ {
+ "description": "Test self reference macro",
+ "id": "selfref",
+ "format": "bin",
+ "source": "selfref.asm",
+ "option": "-Ox",
+ "target": [
+ { "stderr": "selfref.stderr" }
+ ],
+ "error": "expected"
+ }
+]
diff --git a/travis/test/selfref.stderr b/travis/test/selfref.stderr
new file mode 100644
index 00000000..da6eaefc
--- /dev/null
+++ b/travis/test/selfref.stderr
@@ -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