[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#471838: Extend testset for description checks



Package: lintian
Version: 1.23.46
Tags: patch

Hi,

following your call for help, I decided to write a testset for some
tags from private/tags-never-seen. As those tags are mostly from the
description checks, I decided to create a new directory called
"description", I hope this approach is fine with you. Please consider
applying the attached patch which adds new tests for 11 tags (the
debian/changelog file in the created package is actually correct).

Moreover, it would be great if you could update the SVN copy of the
tags-never-seen file. BTW, how do you generate that file?

Regards,
Tobias

-- 
Tobias Toedter   | No sense being pessimistic - it wouldn't work anyway.
Hamburg, Germany |
diff --git a/testset/description/debian/changelog b/testset/description/debian/changelog
new file mode 100644
index 0000000..9877911
--- /dev/null
+++ b/testset/description/debian/changelog
@@ -0,0 +1,22 @@
+description (1.0-1) unstable; urgency=low
+
+  * Initial release.
+  * Add the following tests of tags never seen:
+    - changelog-not-compressed-with-max-compression
+    - debian-changelog-file-contains-obsolete-user-emacs-settings
+    - description-starts-with-package-name
+    - description-starts-with-leading-spaces
+    - description-contains-tabs
+    - description-is-debmake-template
+    - description-synopsis-is-empty
+    - description-contains-invalid-control-statement
+    - description-too-long
+    - extended-description-line-too-long
+    - possible-unindented-list-in-extended-description
+
+ -- Tobias Toedter <t.toedter@gmx.net>  Wed, 19 Mar 2008 17:01:51 +0100
+
+# Local Variables:
+# cperl-indent-level: 4
+# add-log-mailing-address: Lintian Maintainers <lintian-maint@debian.org>
+# indent-tabs-mode: t
diff --git a/testset/description/debian/control b/testset/description/debian/control
new file mode 100644
index 0000000..cbeb1c9
--- /dev/null
+++ b/testset/description/debian/control
@@ -0,0 +1,34 @@
+Source: description
+Section: text
+Priority: extra
+Maintainer: Lintian Maintainers <lintian-maint@debian.org>
+Uploaders: Tobias Toedter <t.toedter@gmx.net>
+Standards-Version: 3.7.3
+
+Package: description
+Architecture: all
+Description: description is a package which tests lintian's description checks.
+ missing
+ The synopsis should not start with the package's name. Moreover,
+ the long description
+ 	should
+ 	not
+ contain tabs.
+ .control statements are not allowed as well.
+
+Package: description-foo
+Architecture: all
+Description: Don't use tabs	in the synopsis and restrict yourself to less than 80 characters, otherwise Lintian will complain
+    Oh, and don't start the long description with spaces.
+ Now here comes a list:
+ - which is
+ - unfortunately
+ - not correctly indented.
+
+Package: description-bar
+Architecture: all
+Description:
+ There should really be a synopsis.
+ . and please avoid control statements in the long description.
+ The line in an extended description should be less than 80 characters, otherwise you'll get
+ a Lintian warning.
diff --git a/testset/description/debian/rules b/testset/description/debian/rules
new file mode 100755
index 0000000..4281fa7
--- /dev/null
+++ b/testset/description/debian/rules
@@ -0,0 +1,46 @@
+#!/usr/bin/make -f
+
+description=debian/description
+description-foo=debian/description-foo
+description-bar=debian/description-bar
+
+build:
+
+binary-indep:
+	# Create package description
+	install -d $(description)
+	install -d $(description)/DEBIAN
+	install -d $(description)/usr/share/doc/description
+	install -m 644 debian/changelog \
+	  $(description)/usr/share/doc/description/changelog.Debian
+	gzip -1 $(description)/usr/share/doc/description/changelog.Debian
+	dpkg-gencontrol -pdescription -P$(description)
+	dpkg --build $(description) ..
+	
+	# Create package description-foo
+	install -d $(description-foo)
+	install -d $(description-foo)/DEBIAN
+	install -d $(description-foo)/usr/share/doc/description
+	install -m 644 debian/changelog \
+	  $(description-foo)/usr/share/doc/description/changelog.Debian
+	gzip -9 $(description-foo)/usr/share/doc/description/changelog.Debian
+	dpkg-gencontrol -pdescription-foo -P$(description-foo)
+	dpkg --build $(description-foo) ..
+	
+	# Create package description-bar
+	install -d $(description-bar)
+	install -d $(description-bar)/DEBIAN
+	install -d $(description-bar)/usr/share/doc/description
+	install -m 644 debian/changelog \
+	  $(description-bar)/usr/share/doc/description/changelog.Debian
+	gzip -9 $(description-bar)/usr/share/doc/description/changelog.Debian
+	dpkg-gencontrol -pdescription-bar -P$(description-bar)
+	dpkg --build $(description-bar) ..
+
+binary: binary-indep
+
+clean:
+	rm -rf debian/files $(description) $(description-foo) \
+	  $(description-bar) debian/substvars
+
+.PHONY: build binary-indep binary clean
diff --git a/testset/tags.description b/testset/tags.description
new file mode 100644
index 0000000..79b4e17
--- /dev/null
+++ b/testset/tags.description
@@ -0,0 +1,23 @@
+E: description source: debian-rules-missing-required-target binary-arch
+E: description-bar: description-contains-invalid-control-statement
+E: description-bar: description-synopsis-is-empty
+E: description-bar: no-copyright-file
+E: description-foo: description-contains-tabs
+E: description-foo: description-too-long
+E: description-foo: no-copyright-file
+E: description: description-contains-invalid-control-statement
+E: description: description-contains-tabs
+E: description: description-is-debmake-template
+E: description: description-starts-with-package-name
+E: description: no-copyright-file
+I: description-bar: no-md5sums-control-file
+I: description-foo: no-md5sums-control-file
+I: description: no-md5sums-control-file
+W: description source: native-package-with-dash-version
+W: description-bar: extended-description-line-too-long
+W: description-foo: description-starts-with-leading-spaces
+W: description-foo: possible-unindented-list-in-extended-description
+W: description: changelog-not-compressed-with-max-compression changelog.Debian.gz
+W: description: debian-changelog-file-contains-obsolete-user-emacs-settings
+W: description: description-synopsis-might-not-be-phrased-properly
+W: description: new-package-should-close-itp-bug

Attachment: signature.asc
Description: PGP signature


Reply to: