.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Zonemaster::Engine::Test::Basic 3pm" .TH Zonemaster::Engine::Test::Basic 3pm 2024-04-22 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Zonemaster::Engine::Test::Basic \- Module implementing tests focused on basic zone functionality .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& my @results = Zonemaster::Engine::Test::Basic\->all( $zone ); .Ve .SH METHODS .IX Header "METHODS" .IP \fBall()\fR 4 .IX Item "all()" .Vb 1 \& my @logentry_array = all( $zone ); .Ve .Sp Runs the default set of tests for that module, i.e. between one and four tests depending on the tested zone. If BASIC01 passes, BASIC02 is run. If BASIC02 fails, BASIC03 is run. .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBcan_continue()\fR 4 .IX Item "can_continue()" .Vb 1 \& my $bool = can_continue( $zone, @logentry_array ); .Ve .Sp Determines if further evaluation of the given zone is possible based on the results from the Basic Test Cases. .Sp Takes a Zonemaster::Engine::Zone object and an array of Zonemaster::Engine::Logger::Entry objects. .Sp Returns a boolean. .IP \fBmetadata()\fR 4 .IX Item "metadata()" .Vb 1 \& my $hash_ref = metadata(); .Ve .Sp Returns a reference to a hash, the keys of which are the names of all Test Cases in the module, and the corresponding values are references to an array containing all the message tags that the Test Case can use in log entries. .IP \fBtag_descriptions()\fR 4 .IX Item "tag_descriptions()" .Vb 1 \& my $hash_ref = tag_descriptions(); .Ve .Sp Used by the built-in translation system. .Sp Returns a reference to a hash, the keys of which are the message tags and the corresponding values are strings (message IDs). .IP \fBversion()\fR 4 .IX Item "version()" .Vb 1 \& my $version_string = version(); .Ve .Sp Returns a string containing the version of the current module. .SH "INTERNAL METHODS" .IX Header "INTERNAL METHODS" .IP \fB_emit_log()\fR 4 .IX Item "_emit_log()" .Vb 1 \& my $log_entry = _emit_log( $message_tag_string, $hash_ref ); .Ve .Sp Adds a message to the logger for this module. See "add($tag, \f(CW$argref\fR, \f(CW$module\fR, \f(CW$testcase\fR)" in Zonemaster::Engine::Logger::Entry for more details. .Sp Takes a string (message tag) and a reference to a hash (arguments). .Sp Returns a Zonemaster::Engine::Logger::Entry object. .IP \fB_ip_disabled_message()\fR 4 .IX Item "_ip_disabled_message()" .Vb 1 \& my $bool = _ip_disabled_message( $logentry_array_ref, $ns, @query_type_array ); .Ve .Sp Checks if the IP version of a given name server is allowed to be queried. If not, it adds a logging message and returns true. Else, it returns false. Used in Test Cases in combination with \fB_ip_enabled_message()\fR. .Sp Takes a reference to an array of Zonemaster::Engine::Logger::Entry objects, a Zonemaster::Engine::Nameserver object and an array of strings (query type). .Sp Returns a boolean. .IP \fB_ip_enabled_message()\fR 4 .IX Item "_ip_enabled_message()" .Vb 1 \& _ip_enabled_message( $array_ref, $ns, @query_type_array ); .Ve .Sp Adds a logging message if the IP version of a given name server is allowed to be queried. Used in Test Cases in combination with \fB_ip_disabled_message()\fR. .Sp Takes a reference to an array of Zonemaster::Engine::Logger::Entry objects, a Zonemaster::Engine::Nameserver object and an array of strings (query type). .SH TESTS .IX Header "TESTS" .IP \fBbasic01()\fR 4 .IX Item "basic01()" .Vb 1 \& my @logentry_array = basic01( $zone ); .Ve .Sp Runs the Basic01 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBbasic02()\fR 4 .IX Item "basic02()" .Vb 1 \& my @logentry_array = basic02( $zone ); .Ve .Sp Runs the Basic02 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects. .IP \fBbasic03()\fR 4 .IX Item "basic03()" .Vb 1 \& my @logentry_array = basic03( $zone ); .Ve .Sp Runs the Basic03 Test Case . .Sp Takes a Zonemaster::Engine::Zone object. .Sp Returns a list of Zonemaster::Engine::Logger::Entry objects.