From 0861523aa0ad4fb7f8a11824fcaa5a9901c0a173 Mon Sep 17 00:00:00 2001
From: Nguyen Anh Quynh <aquynh@gmail.com>
Date: Sat, 21 May 2016 00:03:54 +0800
Subject: [PATCH] regress: add x86_call5.py for issue #56

---
 suite/regress/x86_call5.py | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100755 suite/regress/x86_call5.py

diff --git a/suite/regress/x86_call5.py b/suite/regress/x86_call5.py
new file mode 100755
index 0000000..5e877de
--- /dev/null
+++ b/suite/regress/x86_call5.py
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+# Test 'jmp 0' with both X86 Intel & ATT syntax
+
+# Github issue: #56
+# Author: Nguyen Anh Quynh
+
+from keystone import *
+
+import regress
+
+class TestX86Intel(regress.RegressTest):
+    def runTest(self):
+        # Initialize Keystone engine
+        ks = Ks(KS_ARCH_X86, KS_MODE_32)
+        # Assemble to get back insn encoding & statement count
+        encoding, count = ks.asm(b"call 5", 0x2000)
+        # Assert the result
+        self.assertEqual(encoding, [ 0xe8, 0x00, 0xe0, 0xff, 0xff ])
+
+
+if __name__ == '__main__':
+    regress.main()
-- 
GitLab