mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 23:59:48 -08:00
tests: add tests demonstrating rending of .NET samples
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user