From c359bdd9b127465d2374448dd51ba68d5ebce75a Mon Sep 17 00:00:00 2001 From: bucklereed Date: Fri, 6 Oct 2017 12:17:50 +0100 Subject: LaTeX reader: read polyglossia/babel \text($LANG){...}. --- test/Tests/Readers/LaTeX.hs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/Tests/Readers/LaTeX.hs') diff --git a/test/Tests/Readers/LaTeX.hs b/test/Tests/Readers/LaTeX.hs index 4effe26e8..1486ba415 100644 --- a/test/Tests/Readers/LaTeX.hs +++ b/test/Tests/Readers/LaTeX.hs @@ -166,6 +166,26 @@ tests = [ testGroup "basic" "\\Rn {13}ok" =?> para (str "xiiiok") ] + , testGroup "polyglossia language spans" + [ "french" =: + "hello \\textfrench{bonjour}" =?> + para (str "hello" <> space <> spanWith ("", [], [("lang", "fr")]) (str "bonjour")) + , "nested" =: + "\\textfrench{quelle c'est \\textlatin{primus}?}" =?> + para (spanWith ("", [], [("lang", "fr")]) $ + str "quelle" <> space <> str "c\8217est" <> space <> + spanWith ("", [], [("lang", "la")]) (str "primus") <> str "?") + , "with formatting" =: + "\\textgerman{wie \\emph{spaet} ist es?}" =?> + para (spanWith ("", [], [("lang", "de")]) $ + str "wie" <> space <> emph (str "spaet") <> space <> str "ist" <> space <> str "es?") + , "language options" =: + "\\textgerman[variant=swiss]{hoechdeutsche}" =?> + para (spanWith ("", [], [("lang", "de-CH")]) $ str "hoechdeutsche") + , "unknown option fallback" =: + "\\textgerman[variant=moon]{ueberhoechdeutsche}" =?> + para (spanWith ("", [], [("lang", "de")]) $ str "ueberhoechdeutsche") + ] ] baseCitation :: Citation -- cgit v1.2.3