aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2020-10-11 15:31:27 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2020-10-11 15:31:27 +0300
commit7eb3b34ece6aaaf09c3dc8cfd4b8ec19ed1529cb (patch)
tree63560d4813ceb242d20f340f36c579338532782f
parent4bedceb83c6473c7bda3b6ee13bd238c4b2ab567 (diff)
downloadnasm-7eb3b34ece6aaaf09c3dc8cfd4b8ec19ed1529cb.tar.gz
nasm-7eb3b34ece6aaaf09c3dc8cfd4b8ec19ed1529cb.tar.xz
nasm-7eb3b34ece6aaaf09c3dc8cfd4b8ec19ed1529cb.zip
travis: update nasmformat
No need to generate binaries, just compare __OUTPUT_FORMAT__ output and add missing formats. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--travis/test/nasmformat-aout.stdout2
-rw-r--r--travis/test/nasmformat-bin.stdout2
-rw-r--r--travis/test/nasmformat-elf32.o.tbin464 -> 0 bytes
-rw-r--r--travis/test/nasmformat-elf32.stdout2
-rw-r--r--travis/test/nasmformat-elf64.o.tbin608 -> 0 bytes
-rw-r--r--travis/test/nasmformat-elf64.stdout2
-rw-r--r--travis/test/nasmformat-hex.stdout2
-rw-r--r--travis/test/nasmformat-ieee.stdout2
-rw-r--r--travis/test/nasmformat-macho32.o.tbin296 -> 0 bytes
-rw-r--r--travis/test/nasmformat-macho32.stdout2
-rw-r--r--travis/test/nasmformat-macho64.o.tbin348 -> 0 bytes
-rw-r--r--travis/test/nasmformat-macho64.stdout2
-rw-r--r--travis/test/nasmformat-obj.stdout2
-rw-r--r--travis/test/nasmformat-win32.stdout2
-rw-r--r--travis/test/nasmformat-win64.stdout2
-rw-r--r--travis/test/nasmformat.asm10
-rw-r--r--travis/test/nasmformat.bin.t1
-rw-r--r--travis/test/nasmformat.json52
18 files changed, 74 insertions, 11 deletions
diff --git a/travis/test/nasmformat-aout.stdout b/travis/test/nasmformat-aout.stdout
new file mode 100644
index 00000000..d19d46c2
--- /dev/null
+++ b/travis/test/nasmformat-aout.stdout
@@ -0,0 +1,2 @@
+%line 12+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is aout format file'
diff --git a/travis/test/nasmformat-bin.stdout b/travis/test/nasmformat-bin.stdout
new file mode 100644
index 00000000..2eb4d485
--- /dev/null
+++ b/travis/test/nasmformat-bin.stdout
@@ -0,0 +1,2 @@
+%line 2+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is binary format file'
diff --git a/travis/test/nasmformat-elf32.o.t b/travis/test/nasmformat-elf32.o.t
deleted file mode 100644
index 3a243d2e..00000000
--- a/travis/test/nasmformat-elf32.o.t
+++ /dev/null
Binary files differ
diff --git a/travis/test/nasmformat-elf32.stdout b/travis/test/nasmformat-elf32.stdout
new file mode 100644
index 00000000..e775f20f
--- /dev/null
+++ b/travis/test/nasmformat-elf32.stdout
@@ -0,0 +1,2 @@
+%line 4+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is elf32 format file'
diff --git a/travis/test/nasmformat-elf64.o.t b/travis/test/nasmformat-elf64.o.t
deleted file mode 100644
index 19b15907..00000000
--- a/travis/test/nasmformat-elf64.o.t
+++ /dev/null
Binary files differ
diff --git a/travis/test/nasmformat-elf64.stdout b/travis/test/nasmformat-elf64.stdout
new file mode 100644
index 00000000..63a452ca
--- /dev/null
+++ b/travis/test/nasmformat-elf64.stdout
@@ -0,0 +1,2 @@
+%line 6+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is elf64 format file'
diff --git a/travis/test/nasmformat-hex.stdout b/travis/test/nasmformat-hex.stdout
new file mode 100644
index 00000000..2fc806d2
--- /dev/null
+++ b/travis/test/nasmformat-hex.stdout
@@ -0,0 +1,2 @@
+%line 16+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is ieee format file'
diff --git a/travis/test/nasmformat-ieee.stdout b/travis/test/nasmformat-ieee.stdout
new file mode 100644
index 00000000..2fc806d2
--- /dev/null
+++ b/travis/test/nasmformat-ieee.stdout
@@ -0,0 +1,2 @@
+%line 16+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is ieee format file'
diff --git a/travis/test/nasmformat-macho32.o.t b/travis/test/nasmformat-macho32.o.t
deleted file mode 100644
index 0de7f14a..00000000
--- a/travis/test/nasmformat-macho32.o.t
+++ /dev/null
Binary files differ
diff --git a/travis/test/nasmformat-macho32.stdout b/travis/test/nasmformat-macho32.stdout
new file mode 100644
index 00000000..b4330fa2
--- /dev/null
+++ b/travis/test/nasmformat-macho32.stdout
@@ -0,0 +1,2 @@
+%line 8+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is macho32 format file'
diff --git a/travis/test/nasmformat-macho64.o.t b/travis/test/nasmformat-macho64.o.t
deleted file mode 100644
index 619da9ff..00000000
--- a/travis/test/nasmformat-macho64.o.t
+++ /dev/null
Binary files differ
diff --git a/travis/test/nasmformat-macho64.stdout b/travis/test/nasmformat-macho64.stdout
new file mode 100644
index 00000000..b5809a78
--- /dev/null
+++ b/travis/test/nasmformat-macho64.stdout
@@ -0,0 +1,2 @@
+%line 10+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is macho64 format file'
diff --git a/travis/test/nasmformat-obj.stdout b/travis/test/nasmformat-obj.stdout
new file mode 100644
index 00000000..d206093a
--- /dev/null
+++ b/travis/test/nasmformat-obj.stdout
@@ -0,0 +1,2 @@
+%line 18+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is some other format file'
diff --git a/travis/test/nasmformat-win32.stdout b/travis/test/nasmformat-win32.stdout
new file mode 100644
index 00000000..538a9bbb
--- /dev/null
+++ b/travis/test/nasmformat-win32.stdout
@@ -0,0 +1,2 @@
+%line 14+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is win32 format file'
diff --git a/travis/test/nasmformat-win64.stdout b/travis/test/nasmformat-win64.stdout
new file mode 100644
index 00000000..d206093a
--- /dev/null
+++ b/travis/test/nasmformat-win64.stdout
@@ -0,0 +1,2 @@
+%line 18+1 ./travis/test/nasmformat.asm
+ msg_format: db 'This is some other format file'
diff --git a/travis/test/nasmformat.asm b/travis/test/nasmformat.asm
index 705a2459..549e3be0 100644
--- a/travis/test/nasmformat.asm
+++ b/travis/test/nasmformat.asm
@@ -1,17 +1,19 @@
%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'
+%elifidn __OUTPUT_FORMAT__, aout
+ msg_format: db 'This is aout format file'
+%elifidn __OUTPUT_FORMAT__, win32
+ msg_format: db 'This is win32 format file'
+%elifidn __OUTPUT_FORMAT__, ieee
+ msg_format: db 'This is ieee 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
deleted file mode 100644
index 799fdc74..00000000
--- a/travis/test/nasmformat.bin.t
+++ /dev/null
@@ -1 +0,0 @@
-This is binary format file \ No newline at end of file
diff --git a/travis/test/nasmformat.json b/travis/test/nasmformat.json
index 7ef555fc..0913bbca 100644
--- a/travis/test/nasmformat.json
+++ b/travis/test/nasmformat.json
@@ -4,9 +4,9 @@
"id": "nasmformat",
"format": "bin",
"source": "nasmformat.asm",
- "option": "-Ox",
+ "option": "-E -Ox",
"target": [
- { "output": "nasmformat.bin" }
+ { "stdout": "nasmformat-bin.stdout" }
]
},
{
@@ -14,7 +14,7 @@
"ref": "nasmformat",
"format": "elf32",
"target": [
- { "output": "nasmformat-elf32.o" }
+ { "stdout": "nasmformat-elf32.stdout" }
]
},
{
@@ -22,7 +22,7 @@
"ref": "nasmformat",
"format": "elf64",
"target": [
- { "output": "nasmformat-elf64.o" }
+ { "stdout": "nasmformat-elf64.stdout" }
]
},
{
@@ -30,7 +30,7 @@
"ref": "nasmformat",
"format": "macho32",
"target": [
- { "output": "nasmformat-macho32.o" }
+ { "stdout": "nasmformat-macho32.stdout" }
]
},
{
@@ -38,7 +38,47 @@
"ref": "nasmformat",
"format": "macho64",
"target": [
- { "output": "nasmformat-macho64.o" }
+ { "stdout": "nasmformat-macho64.stdout" }
+ ]
+ },
+ {
+ "description": "Test __OUTPUT_FORMAT__ directive (aout)",
+ "ref": "nasmformat",
+ "format": "aout",
+ "target": [
+ { "stdout": "nasmformat-aout.stdout" }
+ ]
+ },
+ {
+ "description": "Test __OUTPUT_FORMAT__ directive (win32)",
+ "ref": "nasmformat",
+ "format": "win32",
+ "target": [
+ { "stdout": "nasmformat-win32.stdout" }
+ ]
+ },
+ {
+ "description": "Test __OUTPUT_FORMAT__ directive (win64)",
+ "ref": "nasmformat",
+ "format": "win64",
+ "target": [
+ { "stdout": "nasmformat-win64.stdout" }
+ ]
+ },
+ {
+ "description": "Test __OUTPUT_FORMAT__ directive (obj)",
+ "ref": "nasmformat",
+ "format": "obj",
+ "target": [
+ { "stdout": "nasmformat-obj.stdout" }
+ ]
+ },
+ {
+ "description": "Test __OUTPUT_FORMAT__ directive (ieee)",
+ "ref": "nasmformat",
+ "format": "ieee",
+ "target": [
+ { "stdout": "nasmformat-ieee.stdout" }
]
}
]