aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Docx.hs4
-rw-r--r--tests/Tests/Shared.hs2
-rw-r--r--tests/docx/special_punctuation.docxbin0 -> 8408 bytes
-rw-r--r--tests/docx/special_punctuation.native2
-rw-r--r--tests/lhs-test.latex10
-rw-r--r--tests/lhs-test.latex+lhs10
-rw-r--r--tests/writer.latex10
-rw-r--r--tests/writer.man3
8 files changed, 37 insertions, 4 deletions
diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs
index 47292bc99..7e3f1979e 100644
--- a/tests/Tests/Readers/Docx.hs
+++ b/tests/Tests/Readers/Docx.hs
@@ -131,6 +131,10 @@ tests = [ testGroup "inlines"
"docx/tabs.docx"
"docx/tabs.native"
, testCompare
+ "special punctuation"
+ "docx/special_punctuation.docx"
+ "docx/special_punctuation.native"
+ , testCompare
"normalizing inlines"
"docx/normalize.docx"
"docx/normalize.native"
diff --git a/tests/Tests/Shared.hs b/tests/Tests/Shared.hs
index 9b55b7b1d..4d6076114 100644
--- a/tests/Tests/Shared.hs
+++ b/tests/Tests/Shared.hs
@@ -9,7 +9,7 @@ import Test.Framework.Providers.HUnit
import Test.HUnit ( assertBool, (@?=) )
import Text.Pandoc.Builder
import Data.Monoid
-import System.FilePath (joinPath)
+import System.FilePath.Posix (joinPath)
tests :: [Test]
tests = [ testGroup "normalize"
diff --git a/tests/docx/special_punctuation.docx b/tests/docx/special_punctuation.docx
new file mode 100644
index 000000000..8e0bb55c9
--- /dev/null
+++ b/tests/docx/special_punctuation.docx
Binary files differ
diff --git a/tests/docx/special_punctuation.native b/tests/docx/special_punctuation.native
new file mode 100644
index 000000000..304289f44
--- /dev/null
+++ b/tests/docx/special_punctuation.native
@@ -0,0 +1,2 @@
+[Para [Str "Soft",Space,Str "hyphen:",Space,Str "[\173]"]
+,Para [Str "Non-breaking",Space,Str "hyphen:",Space,Str "[\8209]"]]
diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex
index 626a74cfa..2d0373e76 100644
--- a/tests/lhs-test.latex
+++ b/tests/lhs-test.latex
@@ -23,6 +23,8 @@
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
+\makeatletter
+\@ifpackageloaded{hyperref}{}{%
\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
@@ -30,7 +32,13 @@
\else
\usepackage[unicode=true]{hyperref}
\fi
-\usepackage[usenames,dvipsnames]{color}
+}
+\@ifpackageloaded{color}{
+ \PassOptionsToPackage{usenames,dvipsnames}{color}
+}{%
+ \usepackage[usenames,dvipsnames]{color}
+}
+\makeatother
\hypersetup{breaklinks=true,
bookmarks=true,
pdfauthor={},
diff --git a/tests/lhs-test.latex+lhs b/tests/lhs-test.latex+lhs
index 029789ba8..101025c02 100644
--- a/tests/lhs-test.latex+lhs
+++ b/tests/lhs-test.latex+lhs
@@ -23,6 +23,8 @@
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
+\makeatletter
+\@ifpackageloaded{hyperref}{}{%
\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
@@ -30,7 +32,13 @@
\else
\usepackage[unicode=true]{hyperref}
\fi
-\usepackage[usenames,dvipsnames]{color}
+}
+\@ifpackageloaded{color}{
+ \PassOptionsToPackage{usenames,dvipsnames}{color}
+}{%
+ \usepackage[usenames,dvipsnames]{color}
+}
+\makeatother
\hypersetup{breaklinks=true,
bookmarks=true,
pdfauthor={},
diff --git a/tests/writer.latex b/tests/writer.latex
index 8b34777fa..0e5ac8131 100644
--- a/tests/writer.latex
+++ b/tests/writer.latex
@@ -23,6 +23,8 @@
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
+\makeatletter
+\@ifpackageloaded{hyperref}{}{%
\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
@@ -30,7 +32,13 @@
\else
\usepackage[unicode=true]{hyperref}
\fi
-\usepackage[usenames,dvipsnames]{color}
+}
+\@ifpackageloaded{color}{
+ \PassOptionsToPackage{usenames,dvipsnames}{color}
+}{%
+ \usepackage[usenames,dvipsnames]{color}
+}
+\makeatother
\hypersetup{breaklinks=true,
bookmarks=true,
pdfauthor={John MacFarlane; Anonymous},
diff --git a/tests/writer.man b/tests/writer.man
index 900dfcdb2..4b0731772 100644
--- a/tests/writer.man
+++ b/tests/writer.man
@@ -1,3 +1,6 @@
+.\" Automatically generated by Pandoc 1.15.1
+.\"
+.hy
.TH "Pandoc Test Suite" "" "July 17, 2006" "" ""
.PP
This is a set of tests for pandoc.