Pass file to OptionParser->new() in tests so OptionParser::get_vars() works.

This commit is contained in:
Daniel Nichter
2013-03-02 13:10:28 -07:00
parent f7e07493f6
commit 1b95fee620
3 changed files with 12 additions and 3 deletions
+4 -1
View File
@@ -29,7 +29,10 @@ if ( !$master_dbh ) {
plan skip_all => 'Cannot connect to sandbox master';
}
my $o = new OptionParser(description => 'Cxn', file => "$trunk/bin/pt-table-checksum");
my $o = new OptionParser(
description => 'Cxn',
file => "$trunk/bin/pt-table-checksum",
);
$o->get_specs("$trunk/bin/pt-table-checksum");
$o->get_opts();
+4 -1
View File
@@ -44,7 +44,10 @@ elsif ( $db_flavor !~ /XtraDB Cluster/ ) {
plan skip_all => "PXC-only test";
}
my $o = new OptionParser(description => 'Cxn');
my $o = new OptionParser(
description => 'Cxn',
file => "$trunk/bin/pt-table-checksum",
);
$o->get_specs("$trunk/bin/pt-table-checksum");
$o->get_opts();
+4 -1
View File
@@ -41,7 +41,10 @@ sub sleep {
}
my $dp = new DSNParser(opts=>$dsn_opts);
my $o = new OptionParser(description => 'Cxn');
my $o = new OptionParser(
description => 'Cxn',
file => "$trunk/bin/pt-table-checksum",
);
$o->get_specs("$trunk/bin/pt-table-checksum");
$o->get_opts();