File: detect-taint-mode

package info (click to toggle)
libgnupg-interface-perl 1.02-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 740 kB
  • sloc: perl: 3,813; makefile: 6; sh: 5
file content (36 lines) | stat: -rw-r--r-- 725 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Description: Test that Taint mode works
Author: Andrew Ruthven
Bug: https://rt.cpan.org/Ticket/Display.html?id=133041
Last-Update: 2021-01-28

---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- /dev/null
+++ b/t/taint.t
@@ -0,0 +1,26 @@
+#!/usr/bin/perl -wT
+#
+# Ensure we can instatiate in Taint mode. Don't need to
+# do any work, as GnuPG::Interface runs the command we're going
+# to use to detect the version.
+
+use strict;
+
+use lib './t';
+use MyTest;
+
+use GnuPG::Interface;
+
+my $gnupg;
+
+# See that we instantiate an object in Taint mode
+TEST
+{
+    $gnupg = GnuPG::Interface->new( call => '/usr/bin/gpg' );
+};
+
+# See that version is set
+TEST
+{
+    defined $gnupg->version;
+};