aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--travis/test/rdpid.asm21
-rw-r--r--travis/test/rdpid.bin.t1
-rw-r--r--travis/test/rdpid.json21
-rw-r--r--travis/test/rdpid.stderr3
4 files changed, 46 insertions, 0 deletions
diff --git a/travis/test/rdpid.asm b/travis/test/rdpid.asm
new file mode 100644
index 00000000..76d9fc26
--- /dev/null
+++ b/travis/test/rdpid.asm
@@ -0,0 +1,21 @@
+%ifdef ERROR
+ %define ERR(x) x
+%else
+ %define ERR(x)
+%endif
+
+ bits 16
+
+ rdpid eax
+ ERR(rdpid ax)
+
+ bits 32
+
+ rdpid ebx
+ ERR(rdpid bx)
+
+ bits 64
+
+ rdpid rcx
+ rdpid ecx
+ ERR(rdpid cx)
diff --git a/travis/test/rdpid.bin.t b/travis/test/rdpid.bin.t
new file mode 100644
index 00000000..cb2a431a
--- /dev/null
+++ b/travis/test/rdpid.bin.t
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/travis/test/rdpid.json b/travis/test/rdpid.json
new file mode 100644
index 00000000..cbdd3e87
--- /dev/null
+++ b/travis/test/rdpid.json
@@ -0,0 +1,21 @@
+[
+ {
+ "description": "Test rdpid",
+ "id": "rdpid",
+ "format": "bin",
+ "source": "rdpid.asm",
+ "option": "-Ox",
+ "target": [
+ { "output": "rdpid.bin" }
+ ]
+ },
+ {
+ "description": "Test rdpid (error)",
+ "ref": "rdpid",
+ "option": "-Ox -DERROR",
+ "target": [
+ { "stderr": "rdpid.stderr" }
+ ],
+ "error": "expected"
+ }
+]
diff --git a/travis/test/rdpid.stderr b/travis/test/rdpid.stderr
new file mode 100644
index 00000000..f4976b65
--- /dev/null
+++ b/travis/test/rdpid.stderr
@@ -0,0 +1,3 @@
+./travis/test/rdpid.asm:10: error: invalid combination of opcode and operands
+./travis/test/rdpid.asm:15: error: invalid combination of opcode and operands
+./travis/test/rdpid.asm:21: error: invalid combination of opcode and operands