[libpandoc-wrapper-perl] 01/14: Use more Unicode in tests
Jonas Smedegaard
dr at jones.dk
Sat Oct 28 01:35:10 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.6.1-1
in repository libpandoc-wrapper-perl.
commit aa9144d5bce6aa1ec0305833c3f521ec6fbb4925
Author: Jakob Voss <voss at gbv.de>
Date: Thu Feb 2 11:53:38 2017 +0100
Use more Unicode in tests
---
t/convert.t | 4 ++--
t/example.md | 2 +-
t/parse.t | 11 +++++------
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/t/convert.t b/t/convert.t
index 99e715b..43a8db3 100644
--- a/t/convert.t
+++ b/t/convert.t
@@ -5,8 +5,8 @@ use Pandoc;
plan skip_all => 'pandoc executable required' unless pandoc;
-my $latex = pandoc->convert('html' => 'latex', '<em>hello</em>');
-is $latex, '\emph{hello}', 'html => latex';
+my $latex = pandoc->convert('html' => 'latex', '<em>hällo</em>');
+is $latex, '\emph{hällo}', 'html => latex';
my $html = pandoc->convert('markdown' => 'html', '...', '--smart');
is $html, '<p>…</p>', 'markdown => html';
diff --git a/t/example.md b/t/example.md
index 3c4b6ad..7c86b0c 100644
--- a/t/example.md
+++ b/t/example.md
@@ -1 +1 @@
-*--*
+*--ä*
diff --git a/t/parse.t b/t/parse.t
index 3678b33..ea98677 100644
--- a/t/parse.t
+++ b/t/parse.t
@@ -10,18 +10,17 @@ plan skip_all => 'pandoc executable < 1.18 required' # FIXME in Pandoc::Elements
plan skip_all => 'Pandoc::Elements required'
unless eval { require Pandoc::Elements; 1 };
-my $expect = '{"c":[{"c":[{"c":"--","t":"Str"}],"t":"Emph"}],"t":"Para"}';
+my $expect = '{"c":[{"c":[{"c":"--ä","t":"Str"}],"t":"Emph"}],"t":"Para"}';
-my $doc = pandoc->parse( markdown => '*--*' );
+my $doc = pandoc->parse( markdown => "*--ä*" );
isa_ok $doc, 'Pandoc::Document', 'parse markdown';
is $doc->content->[0]->to_json, $expect, 'parse markdown';
-$doc = pandoc->parse( html => '<p><em>--</em></p>', '--normalize' );
+$doc = pandoc->parse( html => '<p><em>--ä</em></p>', '--normalize' );
is $doc->content->[0]->to_json, $expect, 'parse html';
-use utf8;
-$doc = pandoc->parse( markdown => '*--*', '--smart' );
-is $doc->string, '–', 'parse with addition arguments';
+$doc = pandoc->parse( markdown => "*--ä*", '--smart' );
+is $doc->string, "\x{2013}\x{00E4}", 'parse with addition arguments';
is_deeply $doc, pandoc->parse( json => $doc->to_json ), 'parse json';
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libpandoc-wrapper-perl.git
More information about the Pkg-perl-cvs-commits
mailing list