summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/hash.cc7
-rw-r--r--test/testdeb.cc2
-rw-r--r--test/versions.lst7
3 files changed, 15 insertions, 1 deletions
diff --git a/test/hash.cc b/test/hash.cc
index 5334c0331..cfdb4ea9d 100644
--- a/test/hash.cc
+++ b/test/hash.cc
@@ -1,5 +1,6 @@
#include <apt-pkg/md5.h>
#include <apt-pkg/sha1.h>
+#include <apt-pkg/sha256.h>
#include <apt-pkg/strutl.h>
#include <iostream>
@@ -57,6 +58,12 @@ int main()
"d174ab98d277d9f5a5611c2c9f419d9f");
Test<MD5Summation>("12345678901234567890123456789012345678901234567890123456789012345678901234567890",
"57edf4a22be3c955ac49da2e2107b67a");
+
+ // SHA-256, From FIPS 180-2
+ Test<SHA256Summation>("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+ "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1");
+
+
return 0;
}
diff --git a/test/testdeb.cc b/test/testdeb.cc
index 5986621bb..d28f20114 100644
--- a/test/testdeb.cc
+++ b/test/testdeb.cc
@@ -23,7 +23,7 @@ bool Test(const char *File)
return false;
// Extract it.
- ExtractTar Tar(Deb.GetFile(),Member->Size);
+ ExtractTar Tar(Deb.GetFile(),Member->Size, "gzip");
NullStream Dir;
if (Tar.Go(Dir) == false)
return false;
diff --git a/test/versions.lst b/test/versions.lst
index 008a0f2d7..efc19c4f0 100644
--- a/test/versions.lst
+++ b/test/versions.lst
@@ -20,6 +20,13 @@ z . -1
# Epochs
1:0.4 10.3 1
1:1.25-4 1:1.25-8 -1
+0:1.18.36 1.18.36 0
+
+# Funky, but allowed, characters in upstream version
+9:1.18.36:5.4-20 10:0.5.1-22 -1
+9:1.18.36:5.4-20 9:1.18.36:5.5-1 -1
+9:1.18.36:5.4-20 9:1.18.37:4.3-22 -1
+1.18.36-0.17.35-18 1.18.36-19 1
# Junk
1:1.2.13-3 1:1.2.13-3.1 -1