From: nasm-bot f. C. G. <gor...@gm...> - 2018-11-12 07:01:34
|
Commit-ID: c51934e40f10bbaa61ae2b3e8546cd4fedbfc86c Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=c51934e40f10bbaa61ae2b3e8546cd4fedbfc86c Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sun, 11 Nov 2018 16:34:12 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sun, 11 Nov 2018 21:43:46 +0300 test: nasm-t -- Add nasmformat Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- travis/test/nasmformat-elf32.o.t | Bin 0 -> 464 bytes travis/test/nasmformat-elf64.o.t | Bin 0 -> 608 bytes travis/test/nasmformat-macho32.o.t | Bin 0 -> 296 bytes travis/test/nasmformat-macho64.o.t | Bin 0 -> 348 bytes travis/test/nasmformat.asm | 17 ++++++++++++++ travis/test/nasmformat.bin.t | 1 + travis/test/nasmformat.json | 44 +++++++++++++++++++++++++++++++++++++ 7 files changed, 62 insertions(+) diff --git a/travis/test/nasmformat-elf32.o.t b/travis/test/nasmformat-elf32.o.t new file mode 100644 index 0000000..3a243d2 Binary files /dev/null and b/travis/test/nasmformat-elf32.o.t differ diff --git a/travis/test/nasmformat-elf64.o.t b/travis/test/nasmformat-elf64.o.t new file mode 100644 index 0000000..19b1590 Binary files /dev/null and b/travis/test/nasmformat-elf64.o.t differ diff --git a/travis/test/nasmformat-macho32.o.t b/travis/test/nasmformat-macho32.o.t new file mode 100644 index 0000000..0de7f14 Binary files /dev/null and b/travis/test/nasmformat-macho32.o.t differ diff --git a/travis/test/nasmformat-macho64.o.t b/travis/test/nasmformat-macho64.o.t new file mode 100644 index 0000000..619da9f Binary files /dev/null and b/travis/test/nasmformat-macho64.o.t differ diff --git a/travis/test/nasmformat.asm b/travis/test/nasmformat.asm new file mode 100644 index 0000000..705a245 --- /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 0000000..799fdc7 --- /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 0000000..7ef555f --- /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" } + ] + } +] |