241231.1 · 799e604ebe6910b11e97cb31e9c219460095d80b
Release v3.8.1 with minor tweaks to --pytest definition. No functionality chagnes.
reading declarations
@@ -1,6 +1,13 @@ History file for ack 3. https://beyondgrep.com/ +v3.8.1 Tue Dec 31 21:16:49 CST 2024+========================================+[ENHANCEMENTS]+The rules for Pytest were modified so that zsh's ad hoc scraping of+filetypes for tab completion wouldn't blow up. (GH #386)++ v3.8.0 Fri Dec 20 22:07:26 CST 2024 ======================================== [FEATURES]
@@ -3,7 +3,7 @@ use strict; use warnings; -our $VERSION = 'v3.8.0'; # Check https://beyondgrep.com/ for updates+our $VERSION = 'v3.8.1'; # Check https://beyondgrep.com/ for updates use 5.010001;
@@ -16,7 +16,7 @@ A container for functions for the ack program. our $VERSION; our $COPYRIGHT; BEGIN {- $VERSION = 'v3.8.0'; # Check https://beyondgrep.com/ for updates+ $VERSION = 'v3.8.1'; # Check https://beyondgrep.com/ for updates $COPYRIGHT = 'Copyright 2005-2024 Andy Lester.'; } our $STANDALONE = 0;
@@ -420,8 +420,10 @@ sub _options_block { # Pytest # https://pytest.org/---type-add=pytest:match:_test[.]py$---type-add=pytest:match:^test_.*[.]py$+# Pytest files are *.py files that start with test_ or end with _test.py+# https://docs.pytest.org/en/stable/explanation/goodpractices.html#test-discovery+--type-add=pytest:match:_test\.py$+--type-add=pytest:match:^test_.*\.py$ # R # https://www.r-project.org/
t/ack-f.t
@@ -20,6 +20,7 @@ DEFAULT_DIR_EXCLUSIONS: { t/swamp/example.R t/swamp/file.bar t/swamp/file.foo+ t/swamp/foo_test.py t/swamp/fresh.css t/swamp/groceries/another_subdir/fruit t/swamp/groceries/another_subdir/junk@@ -62,6 +63,8 @@ DEFAULT_DIR_EXCLUSIONS: { t/swamp/sample.rake t/swamp/service.svc t/swamp/stuff.cmake+ t/swamp/test_foo.py+ t/swamp/test.py t/swamp/CMakeLists.txt t/swamp/swamp/ignoreme.txt ),
t/ack-k.t
@@ -81,6 +81,9 @@ subtest 'More testing' => sub { t/swamp/fresh.css t/swamp/lua-shebang-test t/swamp/notes.md+ t/swamp/test.py+ t/swamp/test_foo.py+ t/swamp/foo_test.py ); my @files_no_perl = qw(@@ -106,6 +109,9 @@ subtest 'More testing' => sub { t/swamp/fresh.css t/swamp/lua-shebang-test t/swamp/notes.md+ t/swamp/test.py+ t/swamp/test_foo.py+ t/swamp/foo_test.py );
@@ -23,6 +23,7 @@ filter_test( 't/swamp/example.R', 't/swamp/file.bar', 't/swamp/file.foo',+ 't/swamp/foo_test.py', 't/swamp/fresh.css', 't/swamp/fresh.min.css', 't/swamp/fresh.css.min',@@ -58,6 +59,8 @@ filter_test( 't/swamp/sample.aspx', 't/swamp/sample.rake', 't/swamp/service.svc',+ 't/swamp/test.py',+ 't/swamp/test_foo.py', 't/swamp/__pycache__/notes.pl', 't/swamp/blib/ignore.pm', 't/swamp/blib/ignore.pod',
@@ -45,6 +45,7 @@ UNFILTERED: { t/swamp/favicon.ico t/swamp/file.bar t/swamp/file.foo+ t/swamp/foo_test.py t/swamp/fresh.css t/swamp/fresh.css.min t/swamp/fresh.min.css@@ -114,6 +115,8 @@ UNFILTERED: { t/swamp/service.svc t/swamp/solution8.tar t/swamp/stuff.cmake+ t/swamp/test.py+ t/swamp/test_foo.py t/swamp/CMakeLists.txt t/swamp/swamp/ignoreme.txt ),
t/filetype-detection.t
@@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 3;+use Test::More tests => 5; use lib 't'; use Util;@@ -50,5 +50,37 @@ subtest 'ASP.NET' => sub { sets_match( \@results, \@expected, __FILE__ ); }; ++subtest Python => sub {+ my @expected = qw(+ t/swamp/test.py+ t/swamp/foo_test.py+ t/swamp/test_foo.py+ );++ my @args = qw( -f -t python t/swamp );+ ack_sets_match( [ @args ], \@expected, 'With -t python' );++ @args = qw( -f --python t/swamp );+ ack_sets_match( [ @args ], \@expected, 'With --python' );+};+++subtest Pytest => sub {+ my @expected = qw(+ t/swamp/foo_test.py+ t/swamp/test_foo.py+ );++ my @args = qw( -f -t pytest t/swamp );+ ack_sets_match( [ @args ], \@expected, 'With -t pytest' );++ @args = qw( -f --pytest t/swamp );+ ack_sets_match( [ @args ], \@expected, 'With --pytest' );+};++ done_testing();++ exit 0;
t/inverted-file-filter.t
@@ -17,6 +17,7 @@ EXCLUDE_ONLY: { t/swamp/example.R t/swamp/file.bar t/swamp/file.foo+ t/swamp/foo_test.py t/swamp/fresh.css t/swamp/groceries/another_subdir/fruit t/swamp/groceries/another_subdir/junk@@ -49,6 +50,8 @@ EXCLUDE_ONLY: { t/swamp/sample.rake t/swamp/service.svc t/swamp/stuff.cmake+ t/swamp/test.py+ t/swamp/test_foo.py t/swamp/CMakeLists.txt t/swamp/swamp/ignoreme.txt ),
@@ -0,0 +1,6 @@+# foo_test.py IS a pytest test, as well as Python.++code = 0++# This should fail+assert code == 1
@@ -0,0 +1,6 @@+# test.py is NOT a pytest test, but is Python.++code = 0++# This should fail+assert code == 1
@@ -0,0 +1,6 @@+# test_foo.py IS a pytest test, as well as Python.++code = 0++# This should fail+assert code == 1