mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-14 15:33:49 +00:00
Fix for bug 889739: pt-config-diff doesn't diff quoted strings properly
This commit is contained in:
@@ -9,7 +9,7 @@ BEGIN {
|
||||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use English qw(-no_match_vars);
|
||||
use Test::More tests => 16;
|
||||
use Test::More;
|
||||
|
||||
use TextResultSetParser();
|
||||
use MySQLConfigComparer;
|
||||
@@ -369,6 +369,29 @@ $c2 = new MySQLConfig(
|
||||
) or print Dumper($diff);
|
||||
}
|
||||
|
||||
# ############################################################################
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/889739
|
||||
# pt-config-diff doesn't diff quoted strings properly
|
||||
# ############################################################################
|
||||
$c1 = new MySQLConfig(
|
||||
file => "$trunk/$sample/quoted_cnf.txt",
|
||||
TextResultSetParser => $trp,
|
||||
);
|
||||
$c2 = new MySQLConfig(
|
||||
file => "$trunk/$sample/unquoted_cnf.txt",
|
||||
TextResultSetParser => $trp,
|
||||
);
|
||||
{
|
||||
my $diff = $cc->diff(
|
||||
configs => [$c1, $c2],
|
||||
);
|
||||
|
||||
is_deeply(
|
||||
$diff,
|
||||
undef,
|
||||
"Values are the same regardless of quoting"
|
||||
) or diag(Dumper($diff));
|
||||
}
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
@@ -382,4 +405,5 @@ like(
|
||||
qr/Complete test coverage/,
|
||||
'_d() works'
|
||||
);
|
||||
exit;
|
||||
|
||||
done_testing;
|
||||
|
Reference in New Issue
Block a user