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:
12
bin/tests/master/dns_master_load_11_data
Normal file
12
bin/tests/master/dns_master_load_11_data
Normal 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
|
6
bin/tests/master/master11.data
Normal file
6
bin/tests/master/master11.data
Normal 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
|
@@ -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 }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user