0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-07-24 10:25:42 -04:00

travis: add xdefine test

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2020-08-25 14:45:48 +03:00
parent 7f3cfafbd9
commit d9eed2bec7
3 changed files with 28 additions and 0 deletions

15
travis/test/xdefine.asm Normal file
View File

@ -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

View File

@ -0,0 +1 @@
8!"

12
travis/test/xdefine.json Normal file
View File

@ -0,0 +1,12 @@
[
{
"description": "Test weird defines",
"id": "xdefine",
"format": "bin",
"source": "xdefine.asm",
"option": "-Ox",
"target": [
{ "output": "xdefine.bin" }
]
}
]