Skip to content

Commit

Permalink
test: add test for (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrewh committed Aug 27, 2024
1 parent 0ec4fe4 commit 33f9f5a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ def no_warnings_or_errors(stdout: bytes, stderr: bytes) -> bool:
lambda o, e: e.count(b"RuntimeError: Hooked PC 1337133713371337 is invalid.") == 1,
]
)),

("test_pwntools", "simple.c", "test_pwntools.py", RunOpts(), ExpectedResult(
retcode=0,
checkers=[
output_checker,
no_warnings_or_errors,
lambda o, e: o.count(b"pass\n") == 1,
]
)),
]

def main():
Expand Down
6 changes: 6 additions & 0 deletions tests/test_pwntools.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from pwn import *
from pyda import *

p = process(io=True)
p.run()
print("pass")

0 comments on commit 33f9f5a

Please sign in to comment.