| 1 | Descriptionscip-debian debian libgnupg-interface-perl 1.04-6 libgnupg-interface-perl/patches/test_reset_version_on_call_change#Description.: Using 'call' method doesn't reset gpg version |
| 2 | GnuPG::Interface allows the use of the 'call' method to change |
| 3 | the program to be used. Test that this works. |
| 4 | Authorscip-debian debian libgnupg-interface-perl 1.04-6 libgnupg-interface-perl/patches/test_reset_version_on_call_change#Author.: Andrew Ruthven <[email protected]scip-debian . . . identity/`[email protected]`.> |
| 5 | Bugscip-debian debian libgnupg-interface-perl 1.04-6 libgnupg-interface-perl/patches/test_reset_version_on_call_change#Bug.: https://rt.cpan.org/Ticket/Display.html?id=133021 |
| 6 | Last-Updatescip-debian debian libgnupg-interface-perl 1.04-6 libgnupg-interface-perl/patches/test_reset_version_on_call_change#Last-Update.: 2021-01-28 |
| 7 | --- /dev/nullscip-debian debian libgnupg-interface-perl 1.04-6 libgnupg-interface-perl/upstream/`/dev/null`: |
| 8 | +++ b/t/update_version.tscip-debian debian libgnupg-interface-perl 1.04-6 libgnupg-interface-perl/upstream/`t/update_version.t`: |
| 9 | @@ -0,0 +1,33 @@ |
| 10 | +#!/usr/bin/perl -w |
| 11 | +# |
| 12 | +# Request Tracker 4 tests use call() to change the program |
| 13 | +# to use to gpg1, however GnuPG::Interface has already set |
| 14 | +# the version to 2.2.x and didn't clear the version, therefore |
| 15 | +# GnuPG::Interface tried to use --pinentry-mode which |
| 16 | +# would fail. |
| 17 | +# |
| 18 | +# Test to ensure that version is cleared - which is then |
| 19 | +# lazy loaded when needed. |
| 20 | + |
| 21 | +use strict; |
| 22 | + |
| 23 | +use lib './t'; |
| 24 | +use MyTest; |
| 25 | + |
| 26 | +use GnuPG::Interface; |
| 27 | + |
| 28 | +my $gnupg = GnuPG::Interface->new(); |
| 29 | + |
| 30 | +# See that version is set |
| 31 | +TEST |
| 32 | +{ |
| 33 | + $gnupg->cmp_version($gnupg->version, '2.2') > 0; |
| 34 | +}; |
| 35 | + |
| 36 | +$gnupg->call('gpg1'); |
| 37 | + |
| 38 | +# See that version is set to 1.4.x. |
| 39 | +TEST |
| 40 | +{ |
| 41 | + $gnupg->cmp_version($gnupg->version, '1.5') < 0; |
| 42 | +}; |