diff options
author | Andrew Ruthven <andrew@etc.gen.nz> | 2021-08-18 04:12:35 +0200 |
---|---|---|
committer | Andrew Ruthven <andrew@etc.gen.nz> | 2021-08-18 04:12:35 +0200 |
commit | 136c25e277302900abd4ea997ce28721c59b5676 (patch) | |
tree | 7f2461afd6381e23d4990d7501c8872eb5d40a0f /test/fake-pinentry.pl |
Import libgnupg-interface-perl_1.02.orig.tar.gz
[dgit import orig libgnupg-interface-perl_1.02.orig.tar.gz]
Diffstat (limited to 'test/fake-pinentry.pl')
-rwxr-xr-x | test/fake-pinentry.pl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/fake-pinentry.pl b/test/fake-pinentry.pl new file mode 100755 index 0000000..40b8b08 --- /dev/null +++ b/test/fake-pinentry.pl @@ -0,0 +1,28 @@ +#!/usr/bin/perl -w +# Use this for your test suites when a perl interpreter is available. +# +# The encrypted keys in your test suite that you expect to work must +# be locked with a passphrase of "test" +# +# Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net> +# +# License: This trivial work is hereby explicitly placed into the +# public domain. Anyone may reuse it, modify it, redistribute it for +# any purpose. + +use strict; +use warnings; + +# turn off buffering +$| = 1; + +print "OK This is only for test suites, and should never be used in production\n"; +while (<STDIN>) { + chomp; + next if (/^$/); + next if (/^#/); + print ("D supercalifragilisticexpialidocious\n") if (/^getpin/i); + print "OK\n"; + exit if (/^bye/i); +} +1; |