Skip to content

Commit

Permalink
Added unittest for parse_address
Browse files Browse the repository at this point in the history
  • Loading branch information
hugsy committed Aug 21, 2021
1 parent 4554aa0 commit 76c060f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/runtests.py
Expand Up @@ -694,7 +694,7 @@ def test_func_get_pid(self):
self.assertTrue(int(res.splitlines()[-1]))
return

def test_gef_get_auxiliary_values(self):
def test_fun_gef_get_auxiliary_values(self):
func = "gef_get_auxiliary_values()"
res = gdb_test_python_method(func, target="/bin/ls")
self.assertNoException(res)
Expand All @@ -704,12 +704,22 @@ def test_gef_get_auxiliary_values(self):
self.assertFalse("'AT_WHATEVER':" in res)
return

def test_gef_convenience(self):
def test_func_gef_convenience(self):
func = "gef_convenience('meh')"
res = gdb_test_python_method(func, target="/bin/ls")
self.assertNoException(res)
return

def test_func_parse_address(self):
func = "parse_address('main+0x4')"
res = gdb_test_python_method(func)
self.assertNoException(res)

func = "parse_address('meh')"
res = gdb_test_python_method(func)
self.assertException(res)
return


class TestGdbFunctionsUnit(GefUnitTestGeneric):
"""Tests gdb convenience functions added by GEF."""
Expand Down

0 comments on commit 76c060f

Please sign in to comment.