3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20 use Test
::Dpkg
qw(:needs);
23 test_needs_command
('codespell');
24 test_needs_srcdir_switch
();
28 my @codespell_skip = qw(
53 my $codespell_skip = join ',', @codespell_skip;
55 my @codespell_opts = (qw(
56 --ignore-words=t/codespell/stopwords
58 "--skip=$codespell_skip"
60 my $tags = qx(codespell
@codespell_opts 2>&1);
63 $tags =~ s/^WARNING: Binary file:.*\n//mg;
64 $tags =~ s{^\./build-aux/.*\n}{}mg;
65 $tags =~ s{^\./man/[a-zA-Z_]+/.*\n}{}mg;
66 # XXX: Ignore python-3.8 runtime warnings:
67 $tags =~ s{^.*: RuntimeWarning: line buffering .*\n}{}mg;
68 $tags =~ s{^\s*file = builtins.open.*\n}{}mg;
71 my $ok = length $tags == 0;