diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-29 18:36:26 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-29 18:36:26 +0200 |
commit | a6d40092c61b43698facb721da867738b801b397 (patch) | |
tree | e4b635a8e6770da9817eabb439cf43bb7359b914 /test/libapt/hashsums_test.cc | |
parent | d074870043ffcd404e014d5793318427435c3ca1 (diff) | |
parent | e99a544c8c48d8067d008b5c7e4e1d5479529ce2 (diff) |
merged from http+urllib://anonscm.debian.org/bzr/bzr/apt/apt/debian-experimental2/
Diffstat (limited to 'test/libapt/hashsums_test.cc')
-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; } |