11.1Sagc#! /bin/sh
21.1Sagc
31.3Srillig# $NetBSD: Testspec,v 1.3 2024/04/28 07:27:42 rillig Exp $
41.1Sagc
51.1Sagc# Copyright (c) 2016 Alistair Crooks <agc@NetBSD.org>
61.1Sagc# All rights reserved.
71.1Sagc#
81.1Sagc# Redistribution and use in source and binary forms, with or without
91.1Sagc# modification, are permitted provided that the following conditions
101.1Sagc# are met:
111.1Sagc# 1. Redistributions of source code must retain the above copyright
121.1Sagc#    notice, this list of conditions and the following disclaimer.
131.1Sagc# 2. Redistributions in binary form must reproduce the above copyright
141.1Sagc#    notice, this list of conditions and the following disclaimer in the
151.1Sagc#    documentation and/or other materials provided with the distribution.
161.1Sagc#
171.1Sagc# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
181.1Sagc# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
191.1Sagc# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
201.1Sagc# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
211.1Sagc# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
221.1Sagc# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
231.1Sagc# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
241.1Sagc# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
251.1Sagc# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
261.1Sagc# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
271.1Sagc#
281.1Sagc
291.1SagcTESTNAME=netpgpverify
301.1Sagc
311.1SagcTESTSET_1_NAME=rsa_signatures
321.1SagcTESTSET_1_FILES='
331.1Sagca.gpg
341.1Sagcb.gpg
351.1Sagcdet
361.1Sagcdet.sig
371.1Sagcjj.asc
381.1Sagcpubring.gpg
391.1SagcNetBSD-6.0_hashes.asc:gzip
401.1Sagcexpected16
411.1Sagcexpected17
421.1Sagcexpected18
431.1Sagcexpected19
441.1Sagcexpected20
451.1Sagcexpected21
461.1Sagcexpected22
471.1Sagcexpected23
481.1Sagcexpected24
491.1Sagcexpected25
501.1Sagcexpected26
511.1Sagcexpected27
521.1Sagcexpected28
531.1Sagcexpected29
541.1Sagcexpected30
551.1Sagcexpected31
561.1Sagcexpected32
571.1Sagcexpected33
581.1Sagcexpected34
591.1Sagcexpected35
601.1Sagc'
611.3SrilligTESTSET_1_CASE_1="-s exit:0 -o file:1.expected -e empty b2e < 1.in"
621.3SrilligTESTSET_1_CASE_2="-s exit:0 -o file:2.expected -e empty b2e < 2.in"
631.1Sagc
641.3SrilligTESTSET_1_CASE_1="-s exit:0 -o file:expected16 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c verify b.gpg"
651.3SrilligDISABLE_TESTSET_1_CASE_2="-s exit:0 -o file:expected17 -e empty netpgpverify -c verify a.gpg"
661.3SrilligTESTSET_1_CASE_3="-s exit:0 -o file:expected18 -e empty env TZ=US/Pacific netpgpverify -c verify a.gpg"
671.3SrilligTESTSET_1_CASE_4="-s exit:0 -o file:expected19 -e empty env TZ=US/Pacific netpgpverify -c verify NetBSD-6.0_RC2_hashes.asc"
681.3SrilligTESTSET_1_CASE_5="-s exit:0 -o file:expected20 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg -c cat jj.asc"
691.3SrilligTESTSET_1_CASE_6="-s exit:0 -o file:expected21 -e empty env TZ=US/Pacific netpgpverify < a.gpg"
701.3SrilligTESTSET_1_CASE_7="-s exit:0 -o file:expected22 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < jj.asc"
711.3SrilligTESTSET_1_CASE_8="-s exit:0 -o file:expected23 -e empty env TZ=US/Pacific netpgpverify < NetBSD-6.0_RC2_hashes.asc"
721.3SrilligTESTSET_1_CASE_9="-s exit:0 -o file:expected24 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < b.gpg"
731.3SrilligDISABLE_TESTSET_1_CASE_10="-s exit:0 -o file:expected25 -e empty netpgpverify NetBSD-6.0_RC1_hashes.gpg"
741.3SrilligDISABLE_TESTSET_1_CASE_11="-s exit:0 -o file:expected26 -e empty netpgpverify < NetBSD-6.0_RC1_hashes.gpg"
751.3SrilligTESTSET_1_CASE_12="-s exit:0 -o file:expected27 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg < NetBSD-6.0_hashes.asc"
761.3SrilligTESTSET_1_CASE_13="-s exit:0 -o file:expected28 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg NetBSD-6.0_hashes.asc"
771.3SrilligDISABLE_TESTSET_1_CASE_14="-s exit:0 -o file:expected29 -e empty netpgpverify NetBSD-6.0_RC1_hashes_ascii.gpg"
781.3SrilligDISABLE_TESTSET_1_CASE_15="-s exit:0 -o file:expected30 -e empty netpgpverify < NetBSD-6.0_RC1_hashes_ascii.gpg"
791.3SrilligTESTSET_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"
801.3SrilligTESTSET_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"
811.3SrilligTESTSET_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"
821.3SrilligTESTSET_1_CASE_19="-s exit:0 -o file:expected34 -e empty env TZ=US/Pacific netpgpverify -k pubring.gpg det.sig"
831.3SrilligTESTSET_1_CASE_20="-s exit:0 -o file:expected35 -e empty env TZ=US/Pacific netpgpverify -c cat -k pubring.gpg det.sig"
841.3SrilligDISABLE_TESTSET_1_CASE_21="-s exit:0 -o file:expected46 -e empty netpgpverify -k problem-pubring.gpg NetBSD-6.0_hashes.asc"
851.1Sagc
861.1SagcTESTSET_2_NAME=dsa_signatures
871.1SagcTESTSET_2_FILES='
881.1Sagcdsa-pubring.gpg
891.1Sagcin1.gpg
901.1Sagcin1.asc
911.1Sagcin2.gpg
921.1Sagcin2.asc
931.1Sagcexpected36
941.1Sagcexpected37
951.1Sagcexpected38
961.1Sagcexpected39
971.1Sagcexpected40
981.1Sagcexpected41
991.1Sagcexpected42
1001.1Sagcexpected43
1011.1Sagcexpected44
1021.1Sagcexpected45
1031.1Sagcexpected46
1041.1Sagc'
1051.3SrilligTESTSET_2_CASE_1="-s exit:0 -o file:expected36 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.gpg"
1061.3SrilligTESTSET_2_CASE_2="-s exit:0 -o file:expected37 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.gpg"
1071.3SrilligTESTSET_2_CASE_3="-s exit:0 -o file:expected38 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in1.asc"
1081.3SrilligTESTSET_2_CASE_4="-s exit:0 -o file:expected39 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg < in1.asc"
1091.3SrilligTESTSET_2_CASE_5="-s exit:0 -o file:expected40 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.gpg"
1101.3SrilligTESTSET_2_CASE_6="-s exit:0 -o file:expected41 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.gpg"
1111.3SrilligTESTSET_2_CASE_7="-s exit:0 -o file:expected42 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat in1.asc"
1121.3SrilligTESTSET_2_CASE_8="-s exit:0 -o file:expected43 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg -c cat < in1.asc"
1131.3SrilligTESTSET_2_CASE_9="-s exit:0 -o file:expected44 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.gpg"
1141.3SrilligTESTSET_2_CASE_10="-s exit:0 -o file:expected45 -e empty env TZ=US/Pacific netpgpverify -k dsa-pubring.gpg in2.asc"
115