[Bps-public-commit] GnuPG-Interface branch update-tests-for-gpg-2.4 created. 1.03-1-gc47bec4

BPS Git Server git at git.bestpractical.com
Tue Dec 12 15:46:53 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG-Interface".

The branch, update-tests-for-gpg-2.4 has been created
        at  c47bec42d6769bdd3d94cf3d41d4ff948452b977 (commit)

- Log -----------------------------------------------------------------
commit c47bec42d6769bdd3d94cf3d41d4ff948452b977
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Dec 12 09:38:25 2023 -0500

    Update tests for gpg 2.3.8+
    
    A few new flags were added to gpg 2.3.8+, and the new "R"
    flag(Restricted encryption) broke tests.
    
    See also gnupg commit 0988e49c45.

diff --git a/t/get_public_keys.t b/t/get_public_keys.t
index 300c81c..8d8eebf 100644
--- a/t/get_public_keys.t
+++ b/t/get_public_keys.t
@@ -181,7 +181,7 @@ TEST
         hex_id                   => 'ADB99D9C2E854A6B',
         creation_date            => 949813119,
         creation_date_string     => '2000-02-06',
-        usage_flags              => 'e',
+        usage_flags              => $gnupg->cmp_version($gnupg->version, '2.3.8') >= 0 ? 'er' : 'e',
         pubkey_data              => $subkey_pub_data,
       );
 
diff --git a/t/get_secret_keys.t b/t/get_secret_keys.t
index 5b4f97e..5fc2a57 100644
--- a/t/get_secret_keys.t
+++ b/t/get_secret_keys.t
@@ -87,7 +87,7 @@ TEST
         hex_id                   => 'ADB99D9C2E854A6B',
         creation_date            => 949813119,
         creation_date_string     => '2000-02-06',
-        usage_flags              => 'e',
+        usage_flags              => $gnupg->cmp_version($gnupg->version, '2.3.8') >= 0 ? 'er' : 'e',
         pubkey_data              => $subkey_pub_data,
       };
 
diff --git a/t/list_secret_keys.t b/t/list_secret_keys.t
index 13a7ae2..44af61f 100644
--- a/t/list_secret_keys.t
+++ b/t/list_secret_keys.t
@@ -45,17 +45,20 @@ TEST
 TEST
 {
     my $keylist;
-    if ($gnupg->cmp_version($gnupg->version, '2.1') < 0) {
-	$keylist = '0';
+    if ( $gnupg->cmp_version( $gnupg->version, '2.1' ) < 0 ) {
+        $keylist = '0';
+    }
+    elsif ( $gnupg->cmp_version( $gnupg->version, '2.1.11' ) <= 0 ) {
+        $keylist = '1';
+    }
+    elsif ( $gnupg->cmp_version( $gnupg->version, '2.3.8' ) < 0 ) {
+        $keylist = '2.2';
     }
     else {
-	if ($gnupg->cmp_version($gnupg->version, '2.1.11') <= 0) {
-	    $keylist = '1';
-	}
-	else {
-	    $keylist = '2';
-	}
+        $keylist = '2';
     }
+
+
     my @files_to_test = ( 'test/secret-keys/1.'.$keylist.'.test' );
 
     return file_match( $outfile, @files_to_test );
diff --git a/test/secret-keys/1.2.test b/test/secret-keys/1.2.2.test
similarity index 100%
copy from test/secret-keys/1.2.test
copy to test/secret-keys/1.2.2.test
diff --git a/test/secret-keys/1.2.test b/test/secret-keys/1.2.test
index 42b27a1..4f8bc23 100644
--- a/test/secret-keys/1.2.test
+++ b/test/secret-keys/1.2.test
@@ -4,7 +4,7 @@ sec   dsa1024 2000-02-06 [SCA]
       93AFC4B1B0288A104996B44253AE596EF950DA9C
 uid           [ unknown] GnuPG test key (for testing purposes only)
 uid           [ unknown] Foo Bar (1)
-ssb   elg768 2000-02-06 [E]
+ssb   elg768 2000-02-06 [ER]
 
 sec   rsa2048 2016-10-12 [SC]
       278F850AA702911F1318F0A61B913CE9B6747DDC

-----------------------------------------------------------------------


hooks/post-receive
-- 
GnuPG-Interface


More information about the Bps-public-commit mailing list