[nasm:nasm-2.15.xx-travis] travis: add ret

nasm-bot for Cyrill Gorcunov gorcunov at gmail.com
Tue Aug 25 08:15:04 PDT 2020


Commit-ID:  91d0980bfabeacb80269c88a097d078d9aadfcd2
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=91d0980bfabeacb80269c88a097d078d9aadfcd2
Author:     Cyrill Gorcunov <gorcunov at gmail.com>
AuthorDate: Tue, 25 Aug 2020 18:05:33 +0300
Committer:  Cyrill Gorcunov <gorcunov at gmail.com>
CommitDate: Tue, 25 Aug 2020 18:05:33 +0300

travis: add ret

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>


---
 travis/test/ret-16.stderr     |  1 +
 travis/test/ret-32.stderr     |  1 +
 travis/test/ret-64.stderr     |  1 +
 {test => travis/test}/ret.asm | 11 ++++++++---
 travis/test/ret.bin.t         |  1 +
 travis/test/ret.json          | 39 +++++++++++++++++++++++++++++++++++++++
 6 files changed, 51 insertions(+), 3 deletions(-)

diff --git a/travis/test/ret-16.stderr b/travis/test/ret-16.stderr
new file mode 100644
index 00000000..1994fe9d
--- /dev/null
+++ b/travis/test/ret-16.stderr
@@ -0,0 +1 @@
+./travis/test/ret.asm:18: error: expression syntax error
\ No newline at end of file
diff --git a/travis/test/ret-32.stderr b/travis/test/ret-32.stderr
new file mode 100644
index 00000000..b971af0e
--- /dev/null
+++ b/travis/test/ret-32.stderr
@@ -0,0 +1 @@
+./travis/test/ret.asm:37: error: expression syntax error
\ No newline at end of file
diff --git a/travis/test/ret-64.stderr b/travis/test/ret-64.stderr
new file mode 100644
index 00000000..f06987b3
--- /dev/null
+++ b/travis/test/ret-64.stderr
@@ -0,0 +1 @@
+./travis/test/ret.asm:53: error: expression syntax error
\ No newline at end of file
diff --git a/test/ret.asm b/travis/test/ret.asm
similarity index 75%
copy from test/ret.asm
copy to travis/test/ret.asm
index a6aa5332..0606257e 100644
--- a/test/ret.asm
+++ b/travis/test/ret.asm
@@ -1,9 +1,9 @@
-	;; All the flavors of RET
+;; All the flavors of RET
 %ifndef ERROR
- %define ERROR 0
+	%define ERROR 0
 %endif
 
-
+%ifdef TEST_BITS_16
 	bits 16
 
 	ret
@@ -20,7 +20,9 @@
 	retnq
 	retfq
 %endif
+%endif
 
+%ifdef TEST_BITS_32
 	bits 32
 
 	ret
@@ -37,7 +39,9 @@
 	retnq
 	retfq
 %endif
+%endif
 
+%ifdef TEST_BITS_64
 	bits 64
 
 	ret
@@ -49,6 +53,7 @@
 %if ERROR
 	retd
 	retnd
+%endif
 %endif
 	retfd
 	retq
diff --git a/travis/test/ret.bin.t b/travis/test/ret.bin.t
new file mode 100644
index 00000000..246929c8
--- /dev/null
+++ b/travis/test/ret.bin.t
@@ -0,0 +1 @@
+ÃÃËÃÃËfÃfÃfËÃÃËfÃfÃfËÃÃËÃÃËfÃfÃfËËÃÃHË
\ No newline at end of file
diff --git a/travis/test/ret.json b/travis/test/ret.json
new file mode 100644
index 00000000..ce1d2ca5
--- /dev/null
+++ b/travis/test/ret.json
@@ -0,0 +1,39 @@
+[
+	{
+		"description": "Test all the flavors of RET",
+		"id": "ret",
+		"format": "bin",
+		"source": "ret.asm",
+		"option": "-Ox -DTEST_BITS_16 -DTEST_BITS_32 -DTEST_BITS_64",
+		"target": [
+			{ "output": "ret.bin" }
+		]
+	},
+	{
+		"description": "Test all the flavors of RET (err 16 bit)",
+		"ref": "ret",
+		"option": "-DERROR -DTEST_BITS_16 -o ret.bin",
+		"target": [
+			{ "stderr": "ret-16.stderr" }
+		],
+		"error": "expected"
+	},
+	{
+		"description": "Test all the flavors of RET (err 32 bit)",
+		"ref": "ret",
+		"option": "-DERROR -DTEST_BITS_32 -o ret.bin",
+		"target": [
+			{ "stderr": "ret-32.stderr" }
+		],
+		"error": "expected"
+	},
+	{
+		"description": "Test all the flavors of RET (err 64 bit)",
+		"ref": "ret",
+		"option": "-DERROR -DTEST_BITS_64 -o ret.bin",
+		"target": [
+			{ "stderr": "ret-64.stderr" }
+		],
+		"error": "expected"
+	}
+]


More information about the Nasm-commits mailing list