2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

Add test for leading zero in SOA serial

This commit is contained in:
Mark Andrews
2000-07-11 02:40:58 +00:00
parent 37ea500c8a
commit 6c3371d89a
3 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
#
# test data for dns_master_load test 11
#
# 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
#
master11.data test in ISC_R_SUCCESS

View File

@@ -0,0 +1,6 @@
;
; The following serial number contains a leading 0 and a 9 so the
; we can catch cases where it is incorrectly treated as a octal
; number.
;
@ 300 IN SOA ns hostmaster 00090000 1200 3600 604800 300

View File

@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: t_master.c,v 1.25 2000/07/09 12:48:43 marka Exp $ */
/* $Id: t_master.c,v 1.26 2000/07/11 02:40:58 marka Exp $ */
#include <config.h>
@@ -302,6 +302,20 @@ t10() {
t_result(result);
}
static const char *a11 =
"dns_master_loadfile allow leading zeros in SOA";
static void
t11() {
int result;
t_assert("dns_master_loadfile", 11, T_REQUIRED, a11);
result = test_master_x("dns_master_load_11_data");
t_result(result);
}
testspec_t T_testlist[] = {
{ t1, "ISC_R_SUCCESS" },
{ t2, "ISC_R_UNEXPECTEDEND" },
@@ -313,6 +327,7 @@ testspec_t T_testlist[] = {
{ t8, "$INCLUDE" },
{ t9, "$INCLUDE w/ DNS_BADCLASS" },
{ t10, "non empty blank lines" },
{ t11, "leading zeros in serial" },
{ NULL, NULL }
};