Fix for bug 889739: pt-config-diff doesn't diff quoted strings properly

This commit is contained in:
Brian Fraser fraserb@gmail.com
2012-07-30 11:50:42 -03:00
parent 2f0812fb33
commit 4c5678876d
3 changed files with 40 additions and 2 deletions

View File

@@ -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;