pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/textproc/p5-Text-Markdown-Discount Fix "Wide character...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/355776c455d6
branches:  trunk
changeset: 383348:355776c455d6
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sat Jul 28 15:52:34 2018 +0000

description:
Fix "Wide character in print" warning when tests fail.
Add tests for a common 2-byte character.

diffstat:

 textproc/p5-Text-Markdown-Discount/distinfo                  |   3 +-
 textproc/p5-Text-Markdown-Discount/patches/patch-t_12.utf8.t |  36 ++++++++++++
 2 files changed, 38 insertions(+), 1 deletions(-)

diffs (54 lines):

diff -r 5ea06016bea0 -r 355776c455d6 textproc/p5-Text-Markdown-Discount/distinfo
--- a/textproc/p5-Text-Markdown-Discount/distinfo       Sat Jul 28 15:23:24 2018 +0000
+++ b/textproc/p5-Text-Markdown-Discount/distinfo       Sat Jul 28 15:52:34 2018 +0000
@@ -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 @@
 SHA1 (patch-Discount.xs) = 6851538b8c894a9069eb70994a6c32b533510601
 SHA1 (patch-MANIFEST) = 6ff1d67f8210d7a72ac1a000010bd944c06c25ac
 SHA1 (patch-Makefile.PL) = a0bbf8acc769933b429385dd9c2126b69052d93d
+SHA1 (patch-t_12.utf8.t) = cea58d7c8a4e50d97cf031b2e7913314fe46b056
diff -r 5ea06016bea0 -r 355776c455d6 textproc/p5-Text-Markdown-Discount/patches/patch-t_12.utf8.t
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/p5-Text-Markdown-Discount/patches/patch-t_12.utf8.t      Sat Jul 28 15:52:34 2018 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index