[lintian] 01/01: c/testsuite.pm: Split up features and tests by comma as well as space, too
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch master
in repository lintian.
commit 98c2644e97cdc2a856d5e475b480ec3a7d8caf28
Author: Axel Beckert <abe@deuxchevaux.org>
Date: Tue Sep 8 21:20:42 2015 +0200
c/testsuite.pm: Split up features and tests by comma as well as space, too
Actually closes: #792418
---
checks/testsuite.pm | 12 ++++++++++--
debian/changelog | 4 ++--
t/tests/testsuite-general/debian/debian/tests/control | 3 +++
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/checks/testsuite.pm b/checks/testsuite.pm
index 8def6ff..e46a162 100644
--- a/checks/testsuite.pm
+++ b/checks/testsuite.pm
@@ -139,7 +139,11 @@ sub check_control_paragraph {
}
if (exists $paragraph->{'features'}) {
- for my $feature (split(' ', $paragraph->{'features'})) {
+ my $features = $paragraph->{'features'};
+ # Trim leading and trailing whitepace before splitting
+ $features =~ s/^\s+//;
+ $features =~ s/\s+$//;
+ for my $feature (split(/\s*,\s*|\s+/ms, $features)) {
if (not exists $KNOWN_FEATURES{$feature}) {
tag 'unknown-runtime-tests-feature', $feature,
'paragraph starting at line', $line;
@@ -161,11 +165,15 @@ sub check_control_paragraph {
}
if (exists $paragraph->{'tests'}) {
+ my $tests = $paragraph->{'tests'};
+ # Trim leading and trailing whitepace before splitting
+ $tests =~ s/^\s+//;
+ $tests =~ s/\s+$//;
my $directory = 'debian/tests';
if (exists $paragraph->{'tests-directory'}) {
$directory = $paragraph->{'tests-directory'};
}
- for my $testname (split(' ', $paragraph->{'tests'})) {
+ for my $testname (split(/\s*,\s*|\s+/ms, $tests)) {
check_test_file($info, $directory, $testname, $line);
}
}
diff --git a/debian/changelog b/debian/changelog
index f0b25a3..60299e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -50,8 +50,8 @@ lintian (2.5.37) UNRELEASED; urgency=medium
* checks/scripts.pm:
+ [BR] Fix Unescaped left brace in regex. (Closes: #788926)
* checks/testsuite.pm:
- + [AB] Split up restrictions by comma as well as space.
- (Closes: #798359, #792418)
+ + [AB] Split up restrictions, features and tests by comma as well as
+ space. (Closes: #798359, #792418)
* checks/version-substvars.pm:
+ [BR] Fix Unescaped left brace in regex is deprecated line 68.
* checks/watch.desc:
diff --git a/t/tests/testsuite-general/debian/debian/tests/control b/t/tests/testsuite-general/debian/debian/tests/control
index 2755664..6348583 100644
--- a/t/tests/testsuite-general/debian/debian/tests/control
+++ b/t/tests/testsuite-general/debian/debian/tests/control
@@ -27,3 +27,6 @@ Restrictions: unknownrestriction
Test-Command: /bin/true
Restrictions: breaks-testbed, rw-build-tree, needs-root
Depends: @
+
+Tests: test-1, test-2
+Depends: @
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: