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