Remove building with NOCRYPTO option
[minix.git] / external / bsd / bind / dist / bin / tests / dnssec-signzone / run-test.sh
blobd00622749b5d5027777745e6d6b171c3ce86b902
1 #!/bin/sh
3 # Copyright (C) 2009, 2012 Internet Systems Consortium, Inc. ("ISC")
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 # PERFORMANCE OF THIS SOFTWARE.
17 # Id: run-test.sh,v 1.3 2009/06/04 02:56:47 tbox Exp
20 sign="../../dnssec/dnssec-signzone -f signed.zone -o example.com."
22 signit() {
23 rm -f signed.zone
24 grep '^;' $zone
25 $sign $zone
28 expect_success() {
29 if ! test -f signed.zone ; then
30 echo "Error: expected success, but sign failed for $zone."
31 else
32 echo "Success: Sign succeeded for $zone."
36 expect_failure() {
37 if test -f signed.zone ; then
38 echo "Error: expected failure, but sign succeeded for $zone."
39 else
40 echo "Success: Sign failed (expected) for $zone"
44 zone="test1.zone" ; signit ; expect_success
45 zone="test2.zone" ; signit ; expect_failure
46 zone="test3.zone" ; signit ; expect_failure
47 zone="test4.zone" ; signit ; expect_success
48 zone="test5.zone" ; signit ; expect_failure
49 zone="test6.zone" ; signit ; expect_failure
50 zone="test7.zone" ; signit ; expect_failure
51 zone="test8.zone" ; signit ; expect_failure