diff options
author | Justus Winter <justus@g10code.com> | 2016-11-03 14:37:15 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2016-11-03 14:43:23 +0100 |
commit | 1ec07cbc209f247fd85704f5701564e31aa56d0b (patch) | |
tree | 305188a94dc0351cb3bf7f08dceef4ef96790c93 /tests/openpgp | |
parent | gpgconf: Add a new field to the --query-swdb output. (diff) | |
download | gnupg2-1ec07cbc209f247fd85704f5701564e31aa56d0b.tar.xz gnupg2-1ec07cbc209f247fd85704f5701564e31aa56d0b.zip |
gpgscm,tests: Add new functions to the test environment.
* tests/gpgscm/lib.scm (first, last, powerset): New functions.
* tests/gpgscm/tests.scm (interactive-shell): New function.
* tests/openpgp/Makefile.am (EXTRA_DIST): Add new file.
* tests/openpgp/README: Document 'interactive-shell'.
* tests/openpgp/shell.scm: New file.
Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'tests/openpgp')
-rw-r--r-- | tests/openpgp/Makefile.am | 2 | ||||
-rw-r--r-- | tests/openpgp/README | 5 | ||||
-rw-r--r-- | tests/openpgp/shell.scm | 32 |
3 files changed, 37 insertions, 2 deletions
diff --git a/tests/openpgp/Makefile.am b/tests/openpgp/Makefile.am index bb9b2f4db..5725e110c 100644 --- a/tests/openpgp/Makefile.am +++ b/tests/openpgp/Makefile.am @@ -188,7 +188,7 @@ sample_msgs = samplemsgs/issue2419.asc EXTRA_DIST = defs.scm $(XTESTS) $(TEST_FILES) \ mkdemodirs signdemokey $(priv_keys) $(sample_keys) \ $(sample_msgs) ChangeLog-2011 run-tests.scm \ - setup.scm finish.scm + setup.scm finish.scm shell.scm CLEANFILES = prepared.stamp x y yy z out err $(data_files) \ plain-1 plain-2 plain-3 trustdb.gpg *.lock .\#lk* \ diff --git a/tests/openpgp/README b/tests/openpgp/README index 8845afd34..75d818e9e 100644 --- a/tests/openpgp/README +++ b/tests/openpgp/README @@ -110,7 +110,10 @@ You can also get an interactive repl by dropping (interactive-repl (current-environment)) -anywhere you like. +anywhere you like. Or, if you want to examine the environment from an +operating system shell, use + + (interactive-shell) ** Interfacing with gpg diff --git a/tests/openpgp/shell.scm b/tests/openpgp/shell.scm new file mode 100644 index 000000000..dadafff05 --- /dev/null +++ b/tests/openpgp/shell.scm @@ -0,0 +1,32 @@ +#!/usr/bin/env gpgscm + +;; Copyright (C) 2016 g10 Code GmbH +;; +;; This file is part of GnuPG. +;; +;; GnuPG is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3 of the License, or +;; (at your option) any later version. +;; +;; GnuPG is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program; if not, see <http://www.gnu.org/licenses/>. + +(load (with-path "defs.scm")) + +;; This is not a test, but can be used to inspect the test +;; environment. Simply execute +;; +;; make -Ctests/openpgp check XTESTS=shell.scm +;; +;; to run it. + +(echo "Note that gpg.conf includes 'batch'. If you want to use gpg") +(echo "interactively you should drop that.") +(echo) +(interactive-shell) |