summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2018-07-28 15:52:34 +0000
committerschmonz <schmonz@pkgsrc.org>2018-07-28 15:52:34 +0000
commitf81a8b8a293e75ce19842e5a7e489d482233422c (patch)
tree91816000242ec64a1c628a7acaace6595cd22735
parentc7a5f92fd9c223deaad35f8b8cf24fddad882274 (diff)
downloadpkgsrc-f81a8b8a293e75ce19842e5a7e489d482233422c.tar.gz
Fix "Wide character in print" warning when tests fail.
Add tests for a common 2-byte character.
-rw-r--r--textproc/p5-Text-Markdown-Discount/distinfo3
-rw-r--r--textproc/p5-Text-Markdown-Discount/patches/patch-t_12.utf8.t36
2 files changed, 38 insertions, 1 deletions
diff --git a/textproc/p5-Text-Markdown-Discount/distinfo b/textproc/p5-Text-Markdown-Discount/distinfo
index a7f86644e57..8af895a2185 100644
--- a/textproc/p5-Text-Markdown-Discount/distinfo
+++ b/textproc/p5-Text-Markdown-Discount/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2018/03/10 05:45:02 schmonz Exp $
+$NetBSD: distinfo,v 1.11 2018/07/28 15:52:34 schmonz Exp $
SHA1 (Text-Markdown-Discount-0.11.tar.gz) = cd0b2bdc3479f90a0f3e68421984bb47f015d1d2
RMD160 (Text-Markdown-Discount-0.11.tar.gz) = a4484f181746789b7bfb7c0faa95011bb374e383
@@ -7,3 +7,4 @@ Size (Text-Markdown-Discount-0.11.tar.gz) = 177087 bytes
SHA1 (patch-Discount.xs) = 6851538b8c894a9069eb70994a6c32b533510601
SHA1 (patch-MANIFEST) = 6ff1d67f8210d7a72ac1a000010bd944c06c25ac
SHA1 (patch-Makefile.PL) = a0bbf8acc769933b429385dd9c2126b69052d93d
+SHA1 (patch-t_12.utf8.t) = cea58d7c8a4e50d97cf031b2e7913314fe46b056
diff --git a/textproc/p5-Text-Markdown-Discount/patches/patch-t_12.utf8.t b/textproc/p5-Text-Markdown-Discount/patches/patch-t_12.utf8.t
new file mode 100644
index 00000000000..c1e1063cfe4
--- /dev/null
+++ b/textproc/p5-Text-Markdown-Discount/patches/patch-t_12.utf8.t
@@ -0,0 +1,36 @@
+$NetBSD: patch-t_12.utf8.t,v 1.1 2018/07/28 15:52:34 schmonz Exp $
+
+Fix "Wide character in print" warning when tests fail.
+Add tests for a common 2-byte character.
+
+--- t/12.utf8.t.orig 2013-11-15 18:26:06.000000000 +0000
++++ t/12.utf8.t
+@@ -1,9 +1,27 @@
+ use strict;
+ use warnings;
+ use utf8;
+-use Test::More tests => 12;
++use Test::More tests => 16;
+ use Text::Markdown::Discount;
+
++binmode Test::More->builder->$_, ':encoding(UTF-8)'
++ for qw(output failure_output todo_output);
++
++{
++ my $perl_string = '# ü';
++ my $html = Text::Markdown::Discount::markdown($perl_string);
++ like $html, qr!<h1>ü</h1>!;
++ ok utf8::is_utf8($html);
++}
++
++{
++ no utf8;
++ my $byte = '# ü';
++ my $html = Text::Markdown::Discount::markdown($byte);
++ like $html, qr!<h1>ü</h1>!;
++ ok !utf8::is_utf8($html);
++}
++
+ {
+ my $perl_string = '# あ';
+ my $html = Text::Markdown::Discount::markdown($perl_string);