From 33f9f5a4571545ff8edfc2e184f9fff298e47a92 Mon Sep 17 00:00:00 2001 From: Andrew Haberlandt Date: Tue, 27 Aug 2024 02:26:33 +0000 Subject: [PATCH] test: add test for (#4) --- tests/run_tests.py | 9 +++++++++ tests/test_pwntools.py | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/test_pwntools.py diff --git a/tests/run_tests.py b/tests/run_tests.py index b7a4d38..a15863a 100644 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -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(): diff --git a/tests/test_pwntools.py b/tests/test_pwntools.py new file mode 100644 index 0000000..104345d --- /dev/null +++ b/tests/test_pwntools.py @@ -0,0 +1,6 @@ +from pwn import * +from pyda import * + +p = process(io=True) +p.run() +print("pass") \ No newline at end of file