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

Added regression check for icon hash #98

Merged
merged 1 commit into from
Jul 16, 2021
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 not shown.
15 changes: 15 additions & 0 deletions tools/fileinfo/features/hashes/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@ def test_correctly_computes_resource_icon_hash(self):
self.assertEqual(self.fileinfo.output['resourceTable']['iconSha256'], 'bdb247c84e26b93d2ea6b7f4e12d3949ef5be2e9c5eff07a805bdc658a770e84')
self.assertEqual(self.fileinfo.output['resourceTable']['iconAvgHash'], '0000202038380000')

class TestResourceIconHash3(Test):
settings = TestSettings(
tool='fileinfo',
input='resource_icon_hash3',
args='--verbose --json'
)

def test_correctly_computes_resource_icon_hash(self):
assert self.fileinfo.succeeded

self.assertEqual(self.fileinfo.output['resourceTable']['iconCrc32'], '06272459')
self.assertEqual(self.fileinfo.output['resourceTable']['iconMd5'], 'be0bd1d1c38eb059201c3a97141728f6')
self.assertEqual(self.fileinfo.output['resourceTable']['iconSha256'], '7e648590d398e4313266a5c7ace61a07302e5325137d03e8fa8f9cc443a15fe4')
self.assertEqual(self.fileinfo.output['resourceTable']['iconAvgHash'], '0042001000004200')

class TestTelfhash1(Test):
settings = TestSettings(
tool='fileinfo',
Expand Down