1 1.1 agc #! /bin/sh 2 1.1 agc 3 1.3 rillig # $NetBSD: Testspec,v 1.3 2024/04/28 07:27:42 rillig Exp $ 4 1.1 agc 5 1.1 agc # Copyright (c) 2016 Alistair Crooks <agc (at] NetBSD.org> 6 1.1 agc # All rights reserved. 7 1.1 agc # 8 1.1 agc # Redistribution and use in source and binary forms, with or without 9 1.1 agc # modification, are permitted provided that the following conditions 10 1.1 agc # are met: 11 1.1 agc # 1. Redistributions of source code must retain the above copyright 12 1.1 agc # notice, this list of conditions and the following disclaimer. 13 1.1 agc # 2. Redistributions in binary form must reproduce the above copyright 14 1.1 agc # notice, this list of conditions and the following disclaimer in the 15 1.1 agc # documentation and/or other materials provided with the distribution. 16 1.1 agc # 17 1.1 agc # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 1.1 agc # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 1.1 agc # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 1.1 agc # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 1.1 agc # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 1.1 agc # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 1.1 agc # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 1.1 agc # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 1.1 agc # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 1.1 agc # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 1.1 agc # 28 1.1 agc 29 1.1 agc TESTNAME=netpgpverify 30 1.1 agc 31 1.1 agc TESTSET_1_NAME=rsa_signatures 32 1.1 agc TESTSET_1_FILES=' 33 1.1 agc a.gpg 34 1.1 agc b.gpg 35 1.1 agc det 36 1.1 agc det.sig 37 1.1 agc jj.asc 38 1.1 agc pubring.gpg 39 1.1 agc NetBSD-6.0_hashes.asc:gzip 40 1.1 agc expected16 41 1.1 agc expected17 42 1.1 agc expected18 43 1.1 agc expected19 44 1.1 agc expected20 45 1.1 agc expected21 46 1.1 agc expected22 47 1.1 agc expected23 48 1.1 agc expected24 49 1.1 agc expected25 50 1.1 agc expected26 51 1.1 agc expected27 52 1.1 agc expected28 53 1.1 agc expected29 54 1.1 agc expected30 55 1.1 agc expected31 56 1.1 agc expected32 57 1.1 agc expected33 58 1.1 agc expected34 59 1.1 agc expected35 60 1.1 agc ' 61 1.3 rillig TESTSET_1_CASE_1="-s exit:0 -o file:1.expected -e empty b2e < 1.in" 62 1.3 rillig TESTSET_1_CASE_2="-s exit:0 -o file:2.expected -e empty b2e < 2.in" 63 1.1 agc 64 1.3 rillig TESTSET_1_CASE_1="-s exit:0 -o file:expected16 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify b.gpg" 65 1.3 rillig DISABLE_TESTSET_1_CASE_2="-s exit:0 -o file:expected17 -e empty netpgpverify -c verify a.gpg" 66 1.3 rillig TESTSET_1_CASE_3="-s exit:0 -o file:expected18 -e empty env TZ=US/Pacific netpgpverify -c verify a.gpg" 67 1.3 rillig TESTSET_1_CASE_4="-s exit:0 -o file:expected19 -e empty env TZ=US/Pacific netpgpverify -c verify NetBSD-6.0_RC2_hashes.asc" 68 1.3 rillig TESTSET_1_CASE_5="-s exit:0 -o file:expected20 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat jj.asc" 69 1.3 rillig TESTSET_1_CASE_6="-s exit:0 -o file:expected21 -e empty env TZ=US/Pacific netpgpverify < a.gpg" 70 1.3 rillig TESTSET_1_CASE_7="-s exit:0 -o file:expected22 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < jj.asc" 71 1.3 rillig TESTSET_1_CASE_8="-s exit:0 -o file:expected23 -e empty env TZ=US/Pacific netpgpverify < NetBSD-6.0_RC2_hashes.asc" 72 1.3 rillig TESTSET_1_CASE_9="-s exit:0 -o file:expected24 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < b.gpg" 73 1.3 rillig DISABLE_TESTSET_1_CASE_10="-s exit:0 -o file:expected25 -e empty netpgpverify NetBSD-6.0_RC1_hashes.gpg" 74 1.3 rillig DISABLE_TESTSET_1_CASE_11="-s exit:0 -o file:expected26 -e empty netpgpverify < NetBSD-6.0_RC1_hashes.gpg" 75 1.3 rillig TESTSET_1_CASE_12="-s exit:0 -o file:expected27 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < NetBSD-6.0_hashes.asc" 76 1.3 rillig TESTSET_1_CASE_13="-s exit:0 -o file:expected28 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg NetBSD-6.0_hashes.asc" 77 1.3 rillig DISABLE_TESTSET_1_CASE_14="-s exit:0 -o file:expected29 -e empty netpgpverify NetBSD-6.0_RC1_hashes_ascii.gpg" 78 1.3 rillig DISABLE_TESTSET_1_CASE_15="-s exit:0 -o file:expected30 -e empty netpgpverify < NetBSD-6.0_RC1_hashes_ascii.gpg" 79 1.3 rillig TESTSET_1_CASE_16="-s exit:0 -o file:expected31 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg b.gpg b.gpg" 80 1.3 rillig TESTSET_1_CASE_17="-s exit:0 -o file:expected32 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg b.gpg b.gpg b.gpg" 81 1.3 rillig TESTSET_1_CASE_18="-s exit:0 -o file:expected33 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat b.gpg jj.asc b.gpg" 82 1.3 rillig TESTSET_1_CASE_19="-s exit:0 -o file:expected34 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg det.sig" 83 1.3 rillig TESTSET_1_CASE_20="-s exit:0 -o file:expected35 -e empty env TZ=US/Pacific netpgpverify -c cat -k pubring.gpg det.sig" 84 1.3 rillig DISABLE_TESTSET_1_CASE_21="-s exit:0 -o file:expected46 -e empty netpgpverify -k problem-pubring.gpg NetBSD-6.0_hashes.asc" 85 1.1 agc 86 1.1 agc TESTSET_2_NAME=dsa_signatures 87 1.1 agc TESTSET_2_FILES=' 88 1.1 agc dsa-pubring.gpg 89 1.1 agc in1.gpg 90 1.1 agc in1.asc 91 1.1 agc in2.gpg 92 1.1 agc in2.asc 93 1.1 agc expected36 94 1.1 agc expected37 95 1.1 agc expected38 96 1.1 agc expected39 97 1.1 agc expected40 98 1.1 agc expected41 99 1.1 agc expected42 100 1.1 agc expected43 101 1.1 agc expected44 102 1.1 agc expected45 103 1.1 agc expected46 104 1.1 agc ' 105 1.3 rillig TESTSET_2_CASE_1="-s exit:0 -o file:expected36 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.gpg" 106 1.3 rillig TESTSET_2_CASE_2="-s exit:0 -o file:expected37 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.gpg" 107 1.3 rillig TESTSET_2_CASE_3="-s exit:0 -o file:expected38 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.asc" 108 1.3 rillig TESTSET_2_CASE_4="-s exit:0 -o file:expected39 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.asc" 109 1.3 rillig TESTSET_2_CASE_5="-s exit:0 -o file:expected40 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.gpg" 110 1.3 rillig TESTSET_2_CASE_6="-s exit:0 -o file:expected41 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.gpg" 111 1.3 rillig TESTSET_2_CASE_7="-s exit:0 -o file:expected42 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.asc" 112 1.3 rillig TESTSET_2_CASE_8="-s exit:0 -o file:expected43 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.asc" 113 1.3 rillig TESTSET_2_CASE_9="-s exit:0 -o file:expected44 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.gpg" 114 1.3 rillig TESTSET_2_CASE_10="-s exit:0 -o file:expected45 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.asc" 115