Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: keystone assemble test should fail without the package #791

Merged
merged 1 commit into from
Jan 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def test_cmd_canary(self):
return

def test_cmd_capstone_disassemble(self):
self.assertNotIn("capstone", gdb_run_silent_cmd("gef missing"))
self.assertFailIfInactiveSession(gdb_run_cmd("capstone-disassemble"))
res = gdb_start_silent_cmd("capstone-disassemble")
self.assertNoException(res)
Expand Down Expand Up @@ -421,7 +422,8 @@ def test_cmd_name_break(self):
return

def test_cmd_keystone_assemble(self):
valid_cmds = [
self.assertNotIn("keystone", gdb_run_silent_cmd("gef missing"))
cmds = [
"assemble --arch arm --mode arm add r0, r1, r2",
"assemble --arch arm --mode arm --endian big add r0, r1, r2",
"assemble --arch arm --mode thumb add r0, r1, r2",
Expand All @@ -445,7 +447,7 @@ def test_cmd_keystone_assemble(self):
"assemble --arch x86 --mode 32 mov eax, 0x42",
"assemble --arch x86 --mode 64 mov rax, 0x42",
]
for cmd in valid_cmds:
for cmd in cmds:
res = gdb_start_silent_cmd(cmd)
self.assertNoException(res)
self.assertTrue(len(res.splitlines()) > 1)
Expand Down