aboutsummaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2020-08-25 14:45:48 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2020-08-25 16:36:10 +0300
commitd9eed2bec786aa7e90d7ee005baed8ca4a3dbadd (patch)
tree5167430dc936c72b1a29fc2c0346b996cf447c70 /travis
parent7f3cfafbd991176012f21d6446dbf96e93bbbfd7 (diff)
downloadnasm-d9eed2bec786aa7e90d7ee005baed8ca4a3dbadd.tar.gz
nasm-d9eed2bec786aa7e90d7ee005baed8ca4a3dbadd.tar.xz
nasm-d9eed2bec786aa7e90d7ee005baed8ca4a3dbadd.zip
travis: add xdefine test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis')
-rw-r--r--travis/test/xdefine.asm15
-rw-r--r--travis/test/xdefine.bin.t1
-rw-r--r--travis/test/xdefine.json12
3 files changed, 28 insertions, 0 deletions
diff --git a/travis/test/xdefine.asm b/travis/test/xdefine.asm
new file mode 100644
index 00000000..5c510cd6
--- /dev/null
+++ b/travis/test/xdefine.asm
@@ -0,0 +1,15 @@
+%idefine d dword
+%define _1digits_nocheck(d) (((d)% 10)+'0')
+%xdefine _1digits(d) (!!(d/10)*(1<<32)+ _1digits_nocheck(d))
+
+ db _1digits(8) ; Should be 0x38
+
+%define n 0x21
+%xdefine ctr n
+%define n 0x22
+
+ db ctr, n ; Should be 0x21, 0x22
+
+%define MNSUFFIX
+%define MNCURRENT TEST%[MNSUFFIX]
+%xdefine var MNCURRENT
diff --git a/travis/test/xdefine.bin.t b/travis/test/xdefine.bin.t
new file mode 100644
index 00000000..6ad8beef
--- /dev/null
+++ b/travis/test/xdefine.bin.t
@@ -0,0 +1 @@
+8!" \ No newline at end of file
diff --git a/travis/test/xdefine.json b/travis/test/xdefine.json
new file mode 100644
index 00000000..39479ec0
--- /dev/null
+++ b/travis/test/xdefine.json
@@ -0,0 +1,12 @@
+[
+ {
+ "description": "Test weird defines",
+ "id": "xdefine",
+ "format": "bin",
+ "source": "xdefine.asm",
+ "option": "-Ox",
+ "target": [
+ { "output": "xdefine.bin" }
+ ]
+ }
+]