250526.11 · b304dbee1cb4d125c6d44f191be8cd758c88acc3
Moving tests to YAML
reading declarations
@@ -65,6 +65,7 @@ t/ack-passthru.t t/ack-print0.t t/ack-proximate.yaml t/ack-s.t+t/ack-s.yaml t/ack-show-types.t t/ack-type-del.t t/ack-type.t
@@ -3,30 +3,13 @@ use strict; use warnings; -use Test::More tests => 4;+use Test::More tests => 1; use lib 't'; use Util; use File::Temp; prep_environment(); -WITHOUT_S: {- my @files = qw( non-existent-file.txt );- my @args = qw( search-term );- my (undef, $stderr) = run_ack_with_stderr( @args, @files );-- is( @{$stderr}, 1, 'Exactly one line of error' );- like( $stderr->[0], qr/\Qnon-existent-file.txt: No such file or directory\E/, q{Error if there's no file} );-}--WITH_S: {- my @files = qw( non-existent-file.txt );- my @args = qw( search-term -s );- my (undef, $stderr) = run_ack_with_stderr( @args, @files );-- is_empty_array( $stderr, 'Nothing in stderr' );-}- RESTRICTED_DIRECTORIES: { my @args = qw( hello -s );
@@ -0,0 +1,14 @@+---+name: Errors without -s+args: search-term non-existent-file.txt+exitcode: 1+stdout:+stderr: |+ ack: non-existent-file.txt: No such file or directory++---+name: Errors with -s+args: -s search-term non-existent-file.txt+exitcode: 1+stdout:+stderr:
@@ -3,7 +3,7 @@ use warnings; use strict; -use Test::More tests => 25;+use Test::More tests => 26; use lib 't'; use Util;