aboutsummaryrefslogtreecommitdiffstats
path: root/travis/test
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-11-11 16:34:12 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-11-11 21:43:46 +0300
commitc51934e40f10bbaa61ae2b3e8546cd4fedbfc86c (patch)
treeba5da4784f13de238e387e97d3be33898b1d1b04 /travis/test
parent7af13e04663c53d946889c619f33201f960b69fd (diff)
downloadnasm-c51934e40f10bbaa61ae2b3e8546cd4fedbfc86c.tar.gz
nasm-c51934e40f10bbaa61ae2b3e8546cd4fedbfc86c.tar.xz
nasm-c51934e40f10bbaa61ae2b3e8546cd4fedbfc86c.zip
test: nasm-t -- Add nasmformat
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'travis/test')
-rw-r--r--travis/test/nasmformat-elf32.o.tbin0 -> 464 bytes
-rw-r--r--travis/test/nasmformat-elf64.o.tbin0 -> 608 bytes
-rw-r--r--travis/test/nasmformat-macho32.o.tbin0 -> 296 bytes
-rw-r--r--travis/test/nasmformat-macho64.o.tbin0 -> 348 bytes
-rw-r--r--travis/test/nasmformat.asm17
-rw-r--r--travis/test/nasmformat.bin.t1
-rw-r--r--travis/test/nasmformat.json44
7 files changed, 62 insertions, 0 deletions
diff --git a/travis/test/nasmformat-elf32.o.t b/travis/test/nasmformat-elf32.o.t
new file mode 100644
index 00000000..3a243d2e
--- /dev/null
+++ b/travis/test/nasmformat-elf32.o.t
Binary files differ
diff --git a/travis/test/nasmformat-elf64.o.t b/travis/test/nasmformat-elf64.o.t
new file mode 100644
index 00000000..19b15907
--- /dev/null
+++ b/travis/test/nasmformat-elf64.o.t
Binary files differ
diff --git a/travis/test/nasmformat-macho32.o.t b/travis/test/nasmformat-macho32.o.t
new file mode 100644
index 00000000..0de7f14a
--- /dev/null
+++ b/travis/test/nasmformat-macho32.o.t
Binary files differ
diff --git a/travis/test/nasmformat-macho64.o.t b/travis/test/nasmformat-macho64.o.t
new file mode 100644
index 00000000..619da9ff
--- /dev/null
+++ b/travis/test/nasmformat-macho64.o.t
Binary files differ
diff --git a/travis/test/nasmformat.asm b/travis/test/nasmformat.asm
new file mode 100644
index 00000000..705a2459
--- /dev/null
+++ b/travis/test/nasmformat.asm
@@ -0,0 +1,17 @@
+%ifidn __OUTPUT_FORMAT__, bin
+ msg_format: db 'This is binary format file'
+%elifidn __OUTPUT_FORMAT__, elf32
+ section .rodata
+ msg_format: db 'This is elf32 format file'
+%elifidn __OUTPUT_FORMAT__, elf64
+ section .rodata
+ msg_format: db 'This is elf64 format file'
+%elifidn __OUTPUT_FORMAT__, macho32
+ section .rodata
+ msg_format: db 'This is macho32 format file'
+%elifidn __OUTPUT_FORMAT__, macho64
+ section .rodata
+ msg_format: db 'This is macho64 format file'
+%else
+ msg_format: db 'This is some other format file'
+%endif
diff --git a/travis/test/nasmformat.bin.t b/travis/test/nasmformat.bin.t
new file mode 100644
index 00000000..799fdc74
--- /dev/null
+++ b/travis/test/nasmformat.bin.t
@@ -0,0 +1 @@
+This is binary format file \ No newline at end of file
diff --git a/travis/test/nasmformat.json b/travis/test/nasmformat.json
new file mode 100644
index 00000000..7ef555fc
--- /dev/null
+++ b/travis/test/nasmformat.json
@@ -0,0 +1,44 @@
+[
+ {
+ "description": "Test __OUTPUT_FORMAT__ directive (bin)",
+ "id": "nasmformat",
+ "format": "bin",
+ "source": "nasmformat.asm",
+ "option": "-Ox",
+ "target": [
+ { "output": "nasmformat.bin" }
+ ]
+ },
+ {
+ "description": "Test __OUTPUT_FORMAT__ directive (elf32)",
+ "ref": "nasmformat",
+ "format": "elf32",
+ "target": [
+ { "output": "nasmformat-elf32.o" }
+ ]
+ },
+ {
+ "description": "Test __OUTPUT_FORMAT__ directive (elf64)",
+ "ref": "nasmformat",
+ "format": "elf64",
+ "target": [
+ { "output": "nasmformat-elf64.o" }
+ ]
+ },
+ {
+ "description": "Test __OUTPUT_FORMAT__ directive (macho32)",
+ "ref": "nasmformat",
+ "format": "macho32",
+ "target": [
+ { "output": "nasmformat-macho32.o" }
+ ]
+ },
+ {
+ "description": "Test __OUTPUT_FORMAT__ directive (macho64)",
+ "ref": "nasmformat",
+ "format": "macho64",
+ "target": [
+ { "output": "nasmformat-macho64.o" }
+ ]
+ }
+]