2 # import-all-certs - GnuPG import test -*- sh -*-
3 # Copyright (C) 2004, 2008 Free Software Foundation, Inc.
5 # This file is part of GnuPG.
7 # GnuPG is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
12 # GnuPG is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, see <http://www.gnu.org/licenses/>.
20 . ${srcdir:-.}/common.sh || exit 2
23 description="GnuPG Import"
24 info "Running $description tests"
26 while read flag dummy section name; do
27 case $flag in \#*) continue ;; esac
28 [ -z "$(echo $flag)" ] && continue;
30 description="import $name"
31 if ${GPGSM} -q --import certs/$name ; then
32 if [ "$flag" = 'p' ]; then
33 pass "importing certificate \`$name' succeeded"
34 elif [ "$flag" = 'f' ]; then
35 fail "importing certificate \`$name' succeeded"
36 elif [ "$flag" = '?' ]; then
37 unresolved "importing certificate \`$name' succeeded"
38 elif [ "$flag" = 'u' ]; then
39 skip "importing certificate \`$name' succeeded"
41 info "importing certificate \`$name' succeeded - (flag=$flag)"
44 if [ "$flag" = 'p' ]; then
45 fail "importing certificate \`$name' failed"
46 elif [ "$flag" = 'f' ]; then
47 pass "importing certificate \`$name' failed"
48 elif [ "$flag" = '?' ]; then
49 unresolved "importing certificate \`$name' failed"
50 elif [ "$flag" = 'u' ]; then
51 skip "importing certificate \`$name' failed"
53 info "importing certificate \`$name' failed - (flag=$flag)"
56 done < $srcdir/import-all-certs.data