diff --git a/tests/test_main.py b/tests/test_main.py index 3053f967..056a292d 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -11,6 +11,7 @@ import textwrap import fixtures from fixtures import * +from fixtures import _1c444_dotnetfile_extractor import capa.main import capa.rules @@ -444,3 +445,13 @@ def test_json_meta(capsys): for addr, info in std_json["meta"]["analysis"]["layout"]["functions"]: if addr == ["absolute", 0x10001010]: assert {"address": ["absolute", 0x10001179]} in info["matched_basic_blocks"] + + +def test_main_dotnet(_1c444_dotnetfile_extractor): + # tests rules can be loaded successfully and all output modes + path = _1c444_dotnetfile_extractor.path + assert capa.main.main([path, "-vv"]) == 0 + assert capa.main.main([path, "-v"]) == 0 + assert capa.main.main([path, "-j"]) == 0 + assert capa.main.main([path, "-q"]) == 0 + assert capa.main.main([path]) == 0