diff options
Diffstat (limited to 'test/libapt')
-rw-r--r-- | test/libapt/hashsums_test.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libapt/hashsums_test.cc b/test/libapt/hashsums_test.cc index ff1536718..2cb71cc38 100644 --- a/test/libapt/hashsums_test.cc +++ b/test/libapt/hashsums_test.cc @@ -135,6 +135,21 @@ int main(int argc, char** argv) equals(argv[5], sha2.Result().Value()); } fclose(fd); + + // test HashString code + { + HashString sha2("SHA256", argv[4]); + equals(sha2.VerifyFile(argv[1]), true); + } + { + HashString sha2("SHA512", argv[5]); + equals(sha2.VerifyFile(argv[1]), true); + } + { + HashString sha2("SHA256:"+string(argv[4])); + equals(sha2.VerifyFile(argv[1]), true); + } + return 0; } |