aboutsummaryrefslogtreecommitdiff
path: root/contrib/libarchive/unzip/test/test_P_encryption.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libarchive/unzip/test/test_P_encryption.c')
-rw-r--r--contrib/libarchive/unzip/test/test_P_encryption.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/libarchive/unzip/test/test_P_encryption.c b/contrib/libarchive/unzip/test/test_P_encryption.c
index e2cf3cda0ebd..ed08a068811b 100644
--- a/contrib/libarchive/unzip/test/test_P_encryption.c
+++ b/contrib/libarchive/unzip/test/test_P_encryption.c
@@ -14,9 +14,13 @@ DEFINE_TEST(test_P_encryption)
extract_reference_file(reffile);
r = systemf("%s -P password %s >test.out 2>test.err", testprog, reffile);
- assertEqualInt(0, r);
- assertNonEmptyFile("test.out");
- assertEmptyFile("test.err");
+ if (r == 256) {
+ assertTextFileContents("unzip: Decryption is unsupported due to lack of crypto library\n", "test.err");
+ } else {
+ assertEqualInt(0, r);
+ assertNonEmptyFile("test.out");
+ assertEmptyFile("test.err");
- assertTextFileContents("plaintext\n", "encrypted/file.txt");
+ assertTextFileContents("plaintext\n", "encrypted/file.txt");
+ }
}