mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Add $include tests.
This commit is contained in:
12
bin/tests/master/dns_master_load_8_data
Normal file
12
bin/tests/master/dns_master_load_8_data
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# test data for dns_master_load test 8
|
||||
#
|
||||
# format is:
|
||||
# masterfile origin class expected_result
|
||||
# where
|
||||
# masterfile name is the name of a file containing master data
|
||||
# origin is the origin
|
||||
# class is the zone's class
|
||||
# expected_result is a text representation of a dns_result_t
|
||||
#
|
||||
master8.data test in ISC_R_SUCCESS
|
12
bin/tests/master/dns_master_load_9_data
Normal file
12
bin/tests/master/dns_master_load_9_data
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# test data for dns_master_load test 9
|
||||
#
|
||||
# format is:
|
||||
# masterfile origin class expected_result
|
||||
# where
|
||||
# masterfile name is the name of a file containing master data
|
||||
# origin is the origin
|
||||
# class is the zone's class
|
||||
# expected_result is a text representation of a dns_result_t
|
||||
#
|
||||
master9.data test in DNS_R_BADCLASS
|
4
bin/tests/master/master8.data
Normal file
4
bin/tests/master/master8.data
Normal file
@@ -0,0 +1,4 @@
|
||||
;
|
||||
; master7.data contains a good zone file
|
||||
;
|
||||
$include master7.data
|
4
bin/tests/master/master9.data
Normal file
4
bin/tests/master/master9.data
Normal file
@@ -0,0 +1,4 @@
|
||||
;
|
||||
; master5.data is bad
|
||||
;
|
||||
$include master5.data
|
@@ -15,7 +15,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: t_master.c,v 1.23 2000/06/22 21:51:09 tale Exp $ */
|
||||
/* $Id: t_master.c,v 1.24 2000/07/03 03:08:22 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -263,6 +263,32 @@ t7() {
|
||||
t_result(result);
|
||||
}
|
||||
|
||||
static const char *a8 =
|
||||
"dns_master_loadfile understands $INCLUDE";
|
||||
|
||||
static void
|
||||
t8() {
|
||||
int result;
|
||||
|
||||
t_assert("dns_master_loadfile", 8, T_REQUIRED, a8);
|
||||
result = test_master_x("dns_master_load_8_data");
|
||||
|
||||
t_result(result);
|
||||
}
|
||||
|
||||
static const char *a9 =
|
||||
"dns_master_loadfile understands $INCLUDE with failure";
|
||||
|
||||
static void
|
||||
t9() {
|
||||
int result;
|
||||
|
||||
t_assert("dns_master_loadfile", 9, T_REQUIRED, a9);
|
||||
result = test_master_x("dns_master_load_9_data");
|
||||
|
||||
t_result(result);
|
||||
}
|
||||
|
||||
testspec_t T_testlist[] = {
|
||||
{ t1, "ISC_R_SUCCESS" },
|
||||
{ t2, "ISC_R_UNEXPECTEDEND" },
|
||||
@@ -271,6 +297,8 @@ testspec_t T_testlist[] = {
|
||||
{ t5, "DNS_BADCLASS" },
|
||||
{ t6, "KEY RR 1" },
|
||||
{ t7, "KEY RR 2" },
|
||||
{ t8, "$INCLUDE" },
|
||||
{ t9, "$INCLUDE w/ DNS_BADCLASS" },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user