mirror of
https://github.com/keystone-engine/keystone
synced 2026-06-08 15:15:30 +00:00
Merge pull request #215 from mrexodia/jmp_0x33_08
added regression test for "jmp 0x33, 08"
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# Test if "jmp 0x33, 08" throws an error.
|
||||
|
||||
# Github issue: #214
|
||||
# Author: Duncan (mrexodia)
|
||||
|
||||
from keystone import *
|
||||
|
||||
import regress
|
||||
|
||||
class TestX86Intel(regress.RegressTest):
|
||||
def runTest(self):
|
||||
# Initialize Keystone engine
|
||||
ks = Ks(KS_ARCH_X86, KS_MODE_32)
|
||||
# Assemble with zero addr
|
||||
try:
|
||||
encoding, count = ks.asm("jmp 0x33, 08", 0)
|
||||
self.fail()
|
||||
except KsError as e:
|
||||
pass
|
||||
|
||||
if __name__ == '__main__':
|
||||
regress.main()
|
||||
Reference in New Issue
Block a user