aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-11-04 22:24:33 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-11-11 21:43:46 +0300
commit34a3e114ae2deb0c9fe47130f8fbb915f5bcb6f6 (patch)
treea99bcb642473c86485b353b7abab835952c5eae5
parent8958826f3f5c8c2010d786d4101c436b0a25e56a (diff)
downloadnasm-34a3e114ae2deb0c9fe47130f8fbb915f5bcb6f6.tar.gz
nasm-34a3e114ae2deb0c9fe47130f8fbb915f5bcb6f6.tar.xz
nasm-34a3e114ae2deb0c9fe47130f8fbb915f5bcb6f6.zip
test: nasm-t -- Add inctest
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--travis/test/inc1.asm6
-rw-r--r--travis/test/inc2.asm8
-rw-r--r--travis/test/inctest.asm13
-rw-r--r--travis/test/inctest.com.tbin0 -> 29 bytes
-rw-r--r--travis/test/inctest.json12
5 files changed, 39 insertions, 0 deletions
diff --git a/travis/test/inc1.asm b/travis/test/inc1.asm
new file mode 100644
index 00000000..0e1058b5
--- /dev/null
+++ b/travis/test/inc1.asm
@@ -0,0 +1,6 @@
+; This file is part of the include test.
+; See inctest.asm for build instructions.
+
+message: db 'hello, world',13,10,'$'
+
+%include "inc2.asm"
diff --git a/travis/test/inc2.asm b/travis/test/inc2.asm
new file mode 100644
index 00000000..c3ba2f75
--- /dev/null
+++ b/travis/test/inc2.asm
@@ -0,0 +1,8 @@
+; This file is part of the include test.
+; See inctest.asm for build instructions.
+
+_main: mov dx,message
+ mov ah,9
+ int 21h
+ mov ax,4c00h
+ int 21h
diff --git a/travis/test/inctest.asm b/travis/test/inctest.asm
new file mode 100644
index 00000000..d6d35cf3
--- /dev/null
+++ b/travis/test/inctest.asm
@@ -0,0 +1,13 @@
+; This file, plus inc1.asm and inc2.asm, test NASM's file inclusion
+; mechanism.
+;
+; This produces a DOS .COM file: to assemble, use
+; nasm -f bin inctest.asm -o inctest.com
+; and when run, it should print `hello, world'.
+
+ BITS 16
+ ORG 0x100
+
+ jmp _main
+
+%include "inc1.asm"
diff --git a/travis/test/inctest.com.t b/travis/test/inctest.com.t
new file mode 100644
index 00000000..353a2873
--- /dev/null
+++ b/travis/test/inctest.com.t
Binary files differ
diff --git a/travis/test/inctest.json b/travis/test/inctest.json
new file mode 100644
index 00000000..f0947ff7
--- /dev/null
+++ b/travis/test/inctest.json
@@ -0,0 +1,12 @@
+[
+ {
+ "description": "Test include directive",
+ "id": "inctest",
+ "format": "bin",
+ "source": "inctest.asm",
+ "option": "-i./travis/test/",
+ "target": [
+ { "output": "inctest.com" }
+ ]
+ }
+]