summaryrefslogtreecommitdiff
path: root/test/libapt/hashsums_test.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 17:52:22 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 17:52:22 +0200
commit74b220028595342028e3309002e4ec359af328f9 (patch)
tree0132b7fd4b4f5fa5e2dbce1f2e0fbeeff2c8e101 /test/libapt/hashsums_test.cc
parent650faab01603caac04494d54cf6b10a65c00ea13 (diff)
parentb11fe392b2245354591296df88c3be2e6218af12 (diff)
merge with debian/experimental
Diffstat (limited to 'test/libapt/hashsums_test.cc')
-rw-r--r--test/libapt/hashsums_test.cc15
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;
}