[lintian] 05/06: T::Lintian: Ensure check.desc files are written in UTF-8
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit ebe77b7b69221a98116ad33b695d9b93b64cc5f6
Author: Niels Thykier <niels@thykier.net>
Date: Sun Apr 13 17:44:42 2014 +0200
T::Lintian: Ensure check.desc files are written in UTF-8
Signed-off-by: Niels Thykier <niels@thykier.net>
---
lib/Test/Lintian.pm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/Test/Lintian.pm b/lib/Test/Lintian.pm
index 42d188d..5f8bfed 100644
--- a/lib/Test/Lintian.pm
+++ b/lib/Test/Lintian.pm
@@ -76,7 +76,8 @@ use Lintian::Data;
use Lintian::Profile;
use Lintian::Tag::Info;
use Lintian::Tags;
-use Lintian::Util qw(read_dpkg_control slurp_entire_file);
+use Lintian::Util
+ qw(read_dpkg_control slurp_entire_file is_string_utf8_encoded);
# We want data files loaded early to avoid problems with missing data
# files ending up in releases (like in 2.5.17 and 2.5.18).
@@ -325,6 +326,12 @@ sub test_check_desc {
'Tag info uses only two spaces after a full stop')
or $builder->diag("$content_type $cname: $tag ($1)\n");
}
+
+ $builder->ok(
+ is_string_utf8_encoded($info),
+ 'Tag info must be written in UTF-8'
+ ) or $builder->diag("$content_type $cname: $tag\n");
+
# Check the tag info for unescaped <> or for unknown tags (which
# probably indicate the same thing).
while ($info =~ s,<([^\s>]+)(?:\s+href=\"[^\"]+\")?>.*?</\1>,,s) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: