mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-19 01:09:21 +08:00
Fix OptionParser to parse new version format.
This commit is contained in:
@@ -221,7 +221,7 @@ sub get_specs {
|
||||
$self->{DSNParser} = DSNParser->new(opts => \@dsn_opts);
|
||||
}
|
||||
|
||||
if ( $contents =~ m/^(Percona Toolkit v.+)$/m ) {
|
||||
if ( $contents =~ m/^=head1 VERSION\n\n^(.+)$/m ) {
|
||||
$self->{version} = $1;
|
||||
MKDEBUG && _d($self->{version});
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ like(
|
||||
$output = `$trunk/bin/pt-visual-explain --version 2>&1`;
|
||||
like(
|
||||
$output,
|
||||
qr/v\d\.\d.\d+/,
|
||||
qr/^pt-visual-explain \d\.\d\.\d+/m,
|
||||
'--version works (bug 823394)'
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user