aboutsummaryrefslogtreecommitdiffstats
path: root/travis/test
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-11-04 22:21:20 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-11-11 21:43:46 +0300
commit8958826f3f5c8c2010d786d4101c436b0a25e56a (patch)
tree9a2012902d6613d57ca3515626b30c2790c66158 /travis/test
parent8e2999b41bbcaff3b85ab2b36818889b7edfa4dc (diff)
downloadnasm-8958826f3f5c8c2010d786d4101c436b0a25e56a.tar.gz
nasm-8958826f3f5c8c2010d786d4101c436b0a25e56a.tar.xz
nasm-8958826f3f5c8c2010d786d4101c436b0a25e56a.zip
test: nasm-t -- Add insnlbl test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis/test')
-rw-r--r--travis/test/insnlbl.asm10
-rw-r--r--travis/test/insnlbl.bin.tbin0 -> 16 bytes
-rw-r--r--travis/test/insnlbl.json11
3 files changed, 21 insertions, 0 deletions
diff --git a/travis/test/insnlbl.asm b/travis/test/insnlbl.asm
new file mode 100644
index 00000000..635e67be
--- /dev/null
+++ b/travis/test/insnlbl.asm
@@ -0,0 +1,10 @@
+;
+; Test "instruction as label" -- make opcodes legal as labels if
+; they are followed by a colon.
+;
+
+do: jmp dq+2
+ dw do, add, sub, dq
+add: jmp add-2
+sub: jmp do+2
+dq: dw $-sub
diff --git a/travis/test/insnlbl.bin.t b/travis/test/insnlbl.bin.t
new file mode 100644
index 00000000..eec01400
--- /dev/null
+++ b/travis/test/insnlbl.bin.t
Binary files differ
diff --git a/travis/test/insnlbl.json b/travis/test/insnlbl.json
new file mode 100644
index 00000000..0ba0ff88
--- /dev/null
+++ b/travis/test/insnlbl.json
@@ -0,0 +1,11 @@
+[
+ {
+ "description": "Test instruction as label",
+ "id": "insnlbl",
+ "format": "bin",
+ "source": "insnlbl.asm",
+ "target": [
+ { "output": "insnlbl.bin" }
+ ]
+ }
+]