@ 11d698f

191104.1 · 0207e4832d56f3b7b65aa6820a1ad306e9e45489

Add diagnostics

reading declarations

Changes to t/ack-man.t. All files

t/ack-man.t

@@ -9,14 +9,25 @@ use Util;  use Test::More; -plan tests => 3;+plan tests => 2;  prep_environment();  my ($stdout, $stderr) = run_ack_with_stderr( '--man' ); -cmp_ok( scalar @{$stdout}, '>', 900, 'The manual should be pretty long.' );-cmp_ok( scalar @{$stdout}, '<', 2000, 'But not too long.' );+my @lines = @{$stdout};+my $nlines = scalar @lines;+my $ok = ($nlines > 900) && ($nlines < 2000);++diag $nlines;+if ( !ok( $ok, "Manual should be between 900-2000 lines long but is actually $nlines long" ) ) {+    my @first = grep { defined } @lines[0..19];+    diag( '--man start=', explain( \@first ) );+++    my @last = grep { defined } @lines[-20..-1];+    diag( '--man end=', explain( \@last ) );+}  my $filtered_stderr = filter_out_perldoc_noise( $stderr ); is_empty_array( $filtered_stderr, 'Nothing in STDERR' );