test: nasm-t -- Add nasmformat

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2018-11-11 16:34:12 +03:00
parent 7af13e0466
commit c51934e40f
7 changed files with 62 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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

View File

@ -0,0 +1 @@
This is binary format file

View File

@ -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" }
]
}
]