From 30b07558c51ca7aa2f45967cbae00b35338c3665 Mon Sep 17 00:00:00 2001 From: Alexandre Pion Date: Mon, 3 Jul 2023 15:50:35 +0200 Subject: [PATCH 1/2] Fix --test documentation --- lib/Zonemaster/CLI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Zonemaster/CLI.pm b/lib/Zonemaster/CLI.pm index a789910f..ea93103e 100755 --- a/lib/Zonemaster/CLI.pm +++ b/lib/Zonemaster/CLI.pm @@ -192,7 +192,7 @@ has 'test' => ( isa => 'ArrayRef', required => 0, documentation => __( -'Specify test to run. Should be either the name of a module, or the name of a module and the name of a method in that module separated by a "/" character (Example: "Basic/basic1"). The method specified must be one that takes a zone object as its single argument. This switch can be repeated.' +'Specify test to run. Should be either the name of a module, or the name of a module and the name of a method in that module separated by a "/" character (Example: "Basic/basic01"). This switch can be repeated.' ) ); From f2acc5b326fc40a42adaf0e63fadf37b04b92964 Mon Sep 17 00:00:00 2001 From: Alexandre Pion Date: Mon, 3 Jul 2023 15:48:07 +0200 Subject: [PATCH 2/2] Make --test option case insensitive --- lib/Zonemaster/CLI.pm | 4 ++-- script/zonemaster-cli | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Zonemaster/CLI.pm b/lib/Zonemaster/CLI.pm index ea93103e..2940d48d 100755 --- a/lib/Zonemaster/CLI.pm +++ b/lib/Zonemaster/CLI.pm @@ -192,7 +192,7 @@ has 'test' => ( isa => 'ArrayRef', required => 0, documentation => __( -'Specify test to run. Should be either the name of a module, or the name of a module and the name of a method in that module separated by a "/" character (Example: "Basic/basic01"). This switch can be repeated.' +'Specify test to run case-insensitively. Should be either the name of a module, or the name of a module and the name of a method in that module separated by a "/" character (Example: "Basic/basic01"). This switch can be repeated.' ) ); @@ -622,7 +622,7 @@ sub run { eval { if ( $self->test and @{ $self->test } > 0 ) { foreach my $t ( @{ $self->test } ) { - my ( $module, $method ) = split( '/', $t, 2 ); + my ( $module, $method ) = split( '/', lc($t), 2 ); if ( $method ) { Zonemaster::Engine->test_method( $module, $method, Zonemaster::Engine->zone( $domain ) ); } diff --git a/script/zonemaster-cli b/script/zonemaster-cli index 00fbe6bf..d00268f9 100755 --- a/script/zonemaster-cli +++ b/script/zonemaster-cli @@ -202,6 +202,7 @@ Limit the testing suite to run only the specified tests. This can be the name of a testing module, in which case all test cases from that module will be run, or the name of a module followed by a slash and the name of a test case (test case identifier) in that module. +This option is case-insensitive. =item --stop_level=LEVEL, --stop-level=LEVEL