Improved test. Changed test file location. Added doc example.

This commit is contained in:
Frank Cizmich
2014-11-05 12:41:15 -02:00
parent 1887ae5770
commit 5edb7366f3
3 changed files with 24 additions and 21 deletions

Binary file not shown.

View File

@@ -52,11 +52,18 @@ ok(
# Issue 1377888: refuse to parse raw binary log
# #############################################################################
my $output = `$trunk/bin/pt-query-digest --type binlog '$trunk/t/pt-query-digest/samples/raw_binlog.log' 2>&1`;
ok(
$output =~ /mysqlbinlog/i ,
'Refuses to parse raw binlog file.'
);
my $output = output(
sub { pt_query_digest::main(@args, "$trunk/t/lib/samples/binlogs/raw_binlog.log") },
stderr => 1
);
like(
$output,
qr/mysqlbinlog/i,
'Refuses to parse raw binlog file'
);
# #############################################################################