From 6e1f31733435724a027d797663e749bfb4034847 Mon Sep 17 00:00:00 2001 From: krystalgamer <krystalgamer@users.noreply.github.com> Date: Mon, 2 Jan 2017 12:17:07 +0000 Subject: [PATCH] Create x86_call0.py --- suite/regress/x86_call0.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 suite/regress/x86_call0.py diff --git a/suite/regress/x86_call0.py b/suite/regress/x86_call0.py new file mode 100644 index 0000000..80363ca --- /dev/null +++ b/suite/regress/x86_call0.py @@ -0,0 +1,23 @@ +#!/usr/bin/python + +# Not really an issue. It works as it is supposed to, I'd like to know if there's any possibility to add a ks_option to allow such +# output + +# Github issue: #267 +# Author: krystalgamer + +from keystone import * + +import regress + +class TestX86(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 0") + # Assert the result + self.assertEqual(encoding, [ 0xE8, 0x00, 0x00, 0x00, 0x00 ]) + +if __name__ == '__main__': + regress.main() -- GitLab