aboutsummaryrefslogtreecommitdiffstats
path: root/travis/test/iftoken.asm
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-11-04 22:41:39 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-11-11 21:43:46 +0300
commit2dccd2c276f5794caf60b9a493536b5f6394d34d (patch)
treee7b637ca190158f72babcf4160befc8f8e95dd20 /travis/test/iftoken.asm
parentf6c973d63257d5fcf27edadcf30184fed08471cb (diff)
downloadnasm-2dccd2c276f5794caf60b9a493536b5f6394d34d.tar.gz
nasm-2dccd2c276f5794caf60b9a493536b5f6394d34d.tar.xz
nasm-2dccd2c276f5794caf60b9a493536b5f6394d34d.zip
test: nasm-t -- Add iftoken
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis/test/iftoken.asm')
-rw-r--r--travis/test/iftoken.asm315
1 files changed, 315 insertions, 0 deletions
diff --git a/travis/test/iftoken.asm b/travis/test/iftoken.asm
new file mode 100644
index 00000000..f4e955ea
--- /dev/null
+++ b/travis/test/iftoken.asm
@@ -0,0 +1,315 @@
+%define ZMACRO
+%define NMACRO 1
+%define TMACRO 1 2
+ db 'N "":'
+%iftoken
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "":'
+%iftoken ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "ZMACRO":'
+%iftoken ZMACRO
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty ZMACRO
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "ZMACRO":'
+%iftoken ZMACRO ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty ZMACRO ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "NMACRO":'
+%iftoken NMACRO
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty NMACRO
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "NMACRO":'
+%iftoken NMACRO ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty NMACRO ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "TMACRO":'
+%iftoken TMACRO
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty TMACRO
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "TMACRO":'
+%iftoken TMACRO ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty TMACRO ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "1":'
+%iftoken 1
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty 1
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "1":'
+%iftoken 1 ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty 1 ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "+1":'
+%iftoken +1
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty +1
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "+1":'
+%iftoken +1 ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty +1 ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "1 2":'
+%iftoken 1 2
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty 1 2
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "1 2":'
+%iftoken 1 2 ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty 1 2 ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "1,2":'
+%iftoken 1,2
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty 1,2
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "1,2":'
+%iftoken 1,2 ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty 1,2 ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "foo":'
+%iftoken foo
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty foo
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "foo":'
+%iftoken foo ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty foo ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "foo bar":'
+%iftoken foo bar
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty foo bar
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "foo bar":'
+%iftoken foo bar ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty foo bar ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "%":'
+%iftoken %
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty %
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "%":'
+%iftoken % ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty % ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "+foo":'
+%iftoken +foo
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty +foo
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "+foo":'
+%iftoken +foo ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty +foo ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'N "<<":'
+%iftoken <<
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty <<
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10
+ db 'C "<<":'
+%iftoken << ; With a comment!
+ db ' token'
+%else
+ db ' ntoken'
+%endif
+%ifempty << ; With a comment!
+ db ' empty'
+%else
+ db ' nempty'
+%endif
+ db 10