re_match: byte-match functions with the game's compiler (Visual C++ 2003)

Runs R:/Workspace/Tools/re/match71.py for up to 50 addresses from main or
an agent's worktree; configured by matcher/match_flags in [reverse].
This commit is contained in:
KeelrLeek committed 2026-10-05 13:10:01 -05:00
1 parent 584fabeb74
commit c7e678eacb
5 files changed
+78 -3

No files matched your search

+14
View File
@@ -136,3 +136,17 @@ class DebuggerForwarder(unittest.TestCase):
d.close()
with self.assertRaises(HarborError):
Debugger({})
class MatchFunctions(unittest.TestCase):
def test_runs_the_matcher_and_reads_its_results(self):
from pathlib import Path
from harbor.reverse import match_functions
config = {"matcher": str(Path(__file__).with_name("fake_matcher.py")), "match_flags": "-TC -O2"}
res = match_functions(config, "0x412F70, 0x404810")
self.assertEqual([r["address"] for r in res["results"]], ["0x412F70", "0x404810"])
self.assertIn("-TC -O2", res["summary"])
with self.assertRaises(HarborError):
match_functions(config, "")
with self.assertRaises(HarborError):
match_functions({}, "0x412F70")