Skip to content

Commit f4b521d

Browse files
committed
test: Use GetOpt::Long for argument parsing
Simplify argument parsing by using a core perl library for parsing arguments.
1 parent 79e4f4e commit f4b521d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/scripts/run-test-suites.pl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,10 @@
2424
use utf8;
2525
use open qw(:std utf8);
2626

27-
use constant FALSE => 0;
28-
use constant TRUE => 1;
27+
use Getopt::Long;
2928

3029
my $verbose;
31-
my $switch = shift;
32-
if ( defined($switch) && ( $switch eq "-v" || $switch eq "--verbose" ) ) {
33-
$verbose = TRUE;
34-
}
30+
GetOptions( "verbose|v" => \$verbose );
3531

3632
# All test suites = executable files, excluding source files, debug
3733
# and profiling information, etc. We can't just grep {! /\./} because

0 commit comments

Comments
 (0)