Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for newly recognised versions of ASPack. #49

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added tools/fileinfo/detection/packers/aspack/asp_uv_09
Binary file not shown.
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions tools/fileinfo/detection/packers/aspack/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,23 @@ class Test(Test):
def test_correctly_analyzes_input_file(self):
assert self.fileinfo.succeeded
assert self.fileinfo.output.contains(r'.*ASPack \(2\.12\)*')

class TestASPack(Test):
settings = TestSettings(
tool='fileinfo',
input=[
'asp_uv_09',
'asp_uv_10',
'asp_uv_11',
],
args='--json'
)

def test_correctly_analyzes_input_file(self):
aspack_recognised = False

self.assertTrue(self.fileinfo.succeeded)
for tool in self.fileinfo.output['tools']:
if tool['type'] == 'packer' and tool['name'] == 'ASPack':
aspack_recognised = True
self.assertTrue(aspack_recognised)