mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-03 11:05:48 +00:00
46 lines
980 B
Perl
46 lines
980 B
Perl
#!/usr/bin/env perl
|
|
|
|
BEGIN {
|
|
die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n"
|
|
unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH};
|
|
unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib";
|
|
};
|
|
|
|
use strict;
|
|
use warnings FATAL => 'all';
|
|
use English qw(-no_match_vars);
|
|
use Test::More;
|
|
|
|
use PerconaTest;
|
|
|
|
like(
|
|
`$trunk/bin/pt-mext 2>&1`,
|
|
qr/Usage:/,
|
|
'It runs'
|
|
);
|
|
|
|
my $cmd = "$trunk/bin/pt-mext";
|
|
my $sample = "$trunk/t/pt-mext/samples";
|
|
|
|
ok(
|
|
no_diff(
|
|
"$cmd -- cat $sample/mext-001.txt",
|
|
"t/pt-mext/samples/mext-001-result.txt",
|
|
),
|
|
"mext-001"
|
|
) or diag($test_diff);
|
|
|
|
ok(
|
|
no_diff(
|
|
"$cmd -r -- cat $sample/mext-002.txt",
|
|
"t/pt-mext/samples/mext-002-result.txt",
|
|
),
|
|
"mext-002 -r"
|
|
) or diag($test_diff);
|
|
|
|
# #############################################################################
|
|
# Done.
|
|
# #############################################################################
|
|
done_testing;
|
|
exit;
|