diff --git a/pandoc.cabal b/pandoc.cabal index 77e1c5d42..b5110de3d 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -417,6 +417,7 @@ Test-Suite test-pandoc Tests.Readers.RST Tests.Readers.Docx Tests.Readers.Txt2Tags + Tests.Readers.EPUB Tests.Writers.Native Tests.Writers.ConTeXt Tests.Writers.HTML diff --git a/tests/Tests/Readers/EPUB.hs b/tests/Tests/Readers/EPUB.hs new file mode 100644 index 000000000..01b68082b --- /dev/null +++ b/tests/Tests/Readers/EPUB.hs @@ -0,0 +1,33 @@ +module Tests.Readers.EPUB (tests) where + +import Text.Pandoc.Options +import Test.Framework +import Test.HUnit (assertBool) +import Test.Framework.Providers.HUnit +import qualified Data.ByteString.Lazy as BL +import Text.Pandoc.Readers.EPUB +import Text.Pandoc.MediaBag (MediaBag, mediaDirectory) +import Control.Applicative + +getMediaBag :: FilePath -> IO MediaBag +getMediaBag fp = snd . readEPUB def <$> BL.readFile fp + +testMediaBag :: FilePath -> [(String, String, Int)] -> IO () +testMediaBag fp bag = do + actBag <- (mediaDirectory <$> getMediaBag fp) + assertBool (show "MediaBag did not match:\nExpected: " + ++ show bag + ++ "\nActual: " + ++ show actBag) + (actBag == bag) + +featuresBag :: [(String, String, Int)] +featuresBag = [("img/ElementaryMathExample.png","image/png",1331),("img/Maghreb1.png","image/png",2520),("img/check.gif","image/gif",1340),("img/check.jpg","image/jpeg",2661),("img/check.png","image/png",2815),("img/cichons_diagram.png","image/png",7045),("img/complex_number.png","image/png",5238),("img/multiscripts_and_greek_alphabet.png","image/png",10060)] + +tests :: [Test] +tests = + [ testGroup "EPUB Mediabag" + [ testCase "features bag" + (testMediaBag "epub.features.epub" featuresBag) + ] + ] diff --git a/tests/epub.features.epub b/tests/epub.features.epub index e45de241b..8dcae384b 100644 Binary files a/tests/epub.features.epub and b/tests/epub.features.epub differ diff --git a/tests/epub.features.native b/tests/epub.features.native index d8299d380..f01070383 100644 --- a/tests/epub.features.native +++ b/tests/epub.features.native @@ -1,4 +1,5 @@ -[Para [Span ("front.xhtml",[],[]) []] +[Para [Image [] ("img/multiscripts_and_greek_alphabet.png","")] +,Para [Span ("front.xhtml",[],[]) []] ,RawBlock (Format "html") "
" ,Header 1 ("",[],[]) [Str "Reflowable",Space,Str "EPUB",Space,Str "3",Space,Str "Conformance",Space,Str "Test",Space,Str "Document:",Space,Str "0100"] ,RawBlock (Format "html") "
" @@ -27,16 +28,6 @@ [[Plain [Str "@@@TODO",Space,Str "provide",Space,Str "info",Space,Str "on",Space,Str "where",Space,Str "to",Space,Str "get",Space,Str "the",Space,Str "results",Space,Str "form"]]])] ,RawBlock (Format "html") "
" ,RawBlock (Format "html") "
" -,Para [Span ("content-xhtml-001.xhtml",[],[]) []] -,Header 1 ("",[],[]) [Str "Content",Space,Str "Documents:",Space,Str "XHTML"] -,Para [Str "This",Space,Str "section",Space,Str "contains",Space,Str "tests",Space,Str "for",Space,Str "static",Space,Str "XHTML",Space,Str "content."] -,Para [Span ("content-xhtml-002.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "iframe-010"],Space,Str "Inline",Space,Str "Frames"] -,Para [Str "Tests",Space,Str "whether",Space,Str "embedding",Space,Str "content",Space,Str "via",Space,Str "an",Space,Code ("",[],[]) "iframe",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"PASS\",",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" ,Para [Span ("content-images-001.xhtml",[],[]) []] ,RawBlock (Format "html") "
" ,Header 2 ("content-images-001.xhtml#multimedia",[],[]) [Str "Multimedia"] @@ -62,126 +53,6 @@ ,RawBlock (Format "html") "
" ,RawBlock (Format "html") "" ,RawBlock (Format "html") "" -,Para [Span ("content-multimedia-001.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 3 ("content-multimedia-001.xhtml#audio",[],[]) [Str "Audio"] -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "audio-010"],Space,Str "The",Space,Code ("",[],[]) "audio",Space,Str "element:",Space,Str "MP3"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Str "HTML5",Space,Code ("",[],[]) "audio",Space,Str "element",Space,Str "is",Space,Str "supported",Space,Str "using",Space,Code ("",[],[]) "MP3",Space,Str "audio."] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "audio",Space,Str "clip",Space,Str "can",Space,Str "be",Space,Str "played",Space,Str "(a",Space,Str "woman's",Space,Str "voice",Space,Str "will",Space,Str "be",Space,Str "heard,",Space,Str "beginning",Space,Str "\"a",Space,Str "crime",Space,Str "to",Space,Str "sink",Space,Str "your",Space,Str "teeth",Space,Str "into\"),",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "audio-020"],Space,Str "The",Space,Code ("",[],[]) "audio",Space,Str "element:",Space,Str "MP4",Space,Str "AAC",Space,Str "LC"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Str "HTML5",Space,Code ("",[],[]) "audio",Space,Str "element",Space,Str "is",Space,Str "supported",Space,Str "using",Space,Code ("",[],[]) "AAC LC",Space,Str "audio",Space,Str "in",Space,Str "an",Space,Code ("",[],[]) "MP4",Space,Str "container."] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "audio",Space,Str "clip",Space,Str "can",Space,Str "be",Space,Str "played",Space,Str "(a",Space,Str "woman's",Space,Str "voice",Space,Str "will",Space,Str "be",Space,Str "heard,",Space,Str "beginning",Space,Str "\"a",Space,Str "crime",Space,Str "to",Space,Str "sink",Space,Str "your",Space,Str "teeth",Space,Str "into\"),",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "audio-030"],Space,Str "The",Space,Code ("",[],[]) "audio",Space,Str "element:",Space,Code ("",[],[]) "source",Space,Str "elements"] -,Para [Str "Tests",Space,Str "whether",Space,Str "media",Space,Str "specified",Space,Str "via",Space,Code ("",[],[]) "source",Space,Str "elements",Space,Str "is",Space,Str "recognized:"] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "audio",Space,Str "clip",Space,Str "can",Space,Str "be",Space,Str "played",Space,Str "(a",Space,Str "woman's",Space,Str "voice",Space,Str "will",Space,Str "be",Space,Str "heard,",Space,Str "beginning",Space,Str "\"a",Space,Str "crime",Space,Str "to",Space,Str "sink",Space,Str "your",Space,Str "teeth",Space,Str "into\"),",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Para [Span ("content-multimedia-002.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,Header 3 ("content-multimedia-002.xhtml#video",[],[]) [Str "Video"] -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "video-010"],Space,Str "The",Space,Code ("",[],[]) "video",Space,Str "element:",Space,Str "VP8"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Str "HTML5",Space,Code ("",[],[]) "video",Space,Str "element",Space,Str "is",Space,Str "supported",Space,Str "using",Space,Code ("",[],[]) "WebM",Space,Str "video",Space,Str "(VP8",Space,Str "video",Space,Str "with",Space,Str "Vorbis",Space,Str "audio)."] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "video",Space,Str "clip",Space,Str "can",Space,Str "be",Space,Str "played",Space,Str "(a",Space,Str "man's",Space,Str "voice",Space,Str "will",Space,Str "be",Space,Str "heard,",Space,Str "beginning",Space,Str "\"Hi",Space,Str "there,",Space,Str "I",Space,Str "quickly",Space,Str "want",Space,Str "to",Space,Str "show",Space,Str "you\"),",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "video-020"],Space,Str "The",Space,Code ("",[],[]) "video",Space,Str "element:",Space,Str "H.264"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Str "HTML5",Space,Code ("",[],[]) "video",Space,Str "element",Space,Str "is",Space,Str "supported",Space,Str "using",Space,Code ("",[],[]) "MP4",Space,Str "video",Space,Str "(H.264",Space,Str "video",Space,Str "with",Space,Str "AAC-LC",Space,Str "audio)."] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "video",Space,Str "clip",Space,Str "can",Space,Str "be",Space,Str "played",Space,Str "(a",Space,Str "man's",Space,Str "voice",Space,Str "will",Space,Str "be",Space,Str "heard,",Space,Str "beginning",Space,Str "\"Hi",Space,Str "there,",Space,Str "I",Space,Str "quickly",Space,Str "want",Space,Str "to",Space,Str "show",Space,Str "you\"),",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "video-030"],Space,Str "The",Space,Code ("",[],[]) "video",Space,Str "element:",Space,Code ("",[],[]) "source",Space,Str "elements"] -,Para [Str "Tests",Space,Str "whether",Space,Str "media",Space,Str "specified",Space,Str "via",Space,Code ("",[],[]) "source",Space,Str "elements",Space,Str "is",Space,Str "recognized:"] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "video",Space,Str "clip",Space,Str "can",Space,Str "be",Space,Str "played",Space,Str "(a",Space,Str "man's",Space,Str "voice",Space,Str "will",Space,Str "be",Space,Str "heard,",Space,Str "beginning",Space,Str "\"Hi",Space,Str "there,",Space,Str "I",Space,Str "quickly",Space,Str "want",Space,Str "to",Space,Str "show",Space,Str "you\"),",Space,Str "the",Space,Str "test",Space,Str "passes."] -,Para [Str "This",Space,Str "test",Space,Str "will",Space,Str "fail",Space,Str "if",Space,Str "neither",Space,Str "H.264",Space,Str "nor",Space,Str "VP8",Space,Str "are",Space,Str "supported,",Space,Str "regardless",Space,Str "of",Space,Str "support",Space,Str "for",Space,Str "the",Space,Code ("",[],[]) "source",Space,Str "element.",Space,Str "Other",Space,Str "codecs",Space,Str "must",Space,Str "be",Space,Str "tested",Space,Str "manually."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "video-040"],Space,Str "The",Space,Code ("",[],[]) "video",Space,Str "element:",Space,Str "Poster",Space,Str "Images"] -,Para [Str "Tests",Space,Str "whether",Space,Str "poster",Space,Str "images",Space,Str "are",Space,Str "supported",Space,Str "the",Space,Str "HTML5",Space,Code ("",[],[]) "video",Space,Str "element:"] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "Skype",Space,Str "logo",Space,Str "appears",Space,Str "in",Space,Str "the",Space,Str "video",Space,Str "area,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "video-050"],Space,Str "The",Space,Code ("",[],[]) "video",Space,Str "element:",Space,Str "Captions",Space,Str "(WebVTT)"] -,Para [Str "Tests",Space,Str "whether",Space,Str "WebVTT",Space,Str "captions",Space,Str "are",Space,Str "supported",Space,Str "in",Space,Str "the",Space,Str "HTML5",Space,Code ("",[],[]) "video",Space,Str "element:"] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "captions",Space,Str "appear",Space,Str "during",Space,Str "the",Space,Str "first",Space,Str "10s",Space,Str "of",Space,Str "video",Space,Str "playback,",Space,Str "or",Space,Str "can",Space,Str "be",Space,Str "turned",Space,Str "on",Space,Str "from",Space,Str "the",Space,Str "player",Space,Str "interface,",Space,Str "then",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "video-060"],Space,Str "The",Space,Code ("",[],[]) "video",Space,Str "element:",Space,Str "Captions",Space,Str "(TTML)"] -,Para [Str "Tests",Space,Str "whether",Space,Str "TTML",Space,Str "captions",Space,Str "are",Space,Str "supported",Space,Str "in",Space,Str "the",Space,Str "HTML5",Space,Code ("",[],[]) "video",Space,Str "element:"] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "captions",Space,Str "appear",Space,Str "during",Space,Str "the",Space,Str "first",Space,Str "10s",Space,Str "of",Space,Str "video",Space,Str "playback,",Space,Str "or",Space,Str "can",Space,Str "be",Space,Str "turned",Space,Str "on",Space,Str "from",Space,Str "the",Space,Str "player",Space,Str "interface,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "video-070"],Space,Str "The",Space,Code ("",[],[]) "video",Space,Str "element:",Space,Str "Subtitles",Space,Str "(WebVTT)"] -,Para [Str "Tests",Space,Str "whether",Space,Str "WebVTT",Space,Str "subtitles",Space,Str "are",Space,Str "supported",Space,Str "in",Space,Str "the",Space,Str "HTML5",Space,Code ("",[],[]) "video",Space,Str "element:"] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "subtitles",Space,Str "appear",Space,Str "during",Space,Str "the",Space,Str "first",Space,Str "10s",Space,Str "of",Space,Str "video",Space,Str "playback,",Space,Str "or",Space,Str "can",Space,Str "be",Space,Str "turned",Space,Str "on",Space,Str "from",Space,Str "the",Space,Str "player",Space,Str "interface,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "video-080"],Space,Str "The",Space,Code ("",[],[]) "video",Space,Str "element:",Space,Str "Subtitles",Space,Str "(TTML)"] -,Para [Str "Tests",Space,Str "whether",Space,Str "TTML",Space,Str "subtitles",Space,Str "are",Space,Str "supported",Space,Str "in",Space,Str "the",Space,Str "HTML5",Space,Code ("",[],[]) "video",Space,Str "element:"] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "subtitles",Space,Str "appear",Space,Str "during",Space,Str "the",Space,Str "first",Space,Str "10s",Space,Str "of",Space,Str "video",Space,Str "playback,",Space,Str "or",Space,Str "can",Space,Str "be",Space,Str "turned",Space,Str "on",Space,Str "from",Space,Str "the",Space,Str "player",Space,Str "interface,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Para [Span ("content-multimedia-003.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,Header 3 ("content-multimedia-003.xhtml#trigger",[],[]) [Code ("",[],[]) "epub:trigger"] -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "trigger-010"],Space,Str "The",Space,Code ("",[],[]) "trigger",Space,Str "element:",Space,Str "play"] -,Para [Str "Tests",Space,Str "whether",Space,Str "playback",Space,Str "of",Space,Str "multimedia",Space,Str "content",Space,Str "by",Space,Code ("",[],[]) "epub:trigger",Space,Str "elements",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") ""] -,Div ("",["trigger-ctrl"],[]) [Plain [Span ("content-multimedia-003.xhtml#play-button",[],[("aria-controls","audio01"),("role","button"),("tabindex","0")]) [Str "play"],LineBreak]] -,Para [Str "If",Space,Str "the",Space,Str "\"play\"",Space,Str "button",Space,Str "initiates",Space,Str "playback",Space,Str "of",Space,Str "the",Space,Str "audio",Space,Str "clip",Space,Str "from",Space,Str "00:00:00,",Space,Str "including",Space,Str "when",Space,Str "pressed",Space,Str "during",Space,Str "playback",Space,Str "or",Space,Str "after",Space,Str "pausing,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "trigger-020"],Space,Str "The",Space,Code ("",[],[]) "trigger",Space,Str "element:",Space,Str "pause/resume"] -,Para [Str "Tests",Space,Str "whether",Space,Str "pausing",Space,Str "and",Space,Str "resumption",Space,Str "of",Space,Str "multimedia",Space,Str "content",Space,Str "by",Space,Code ("",[],[]) "epub:trigger",Space,Str "elements",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") ""] -,Div ("",["trigger-ctrl"],[]) [Plain [Span ("content-multimedia-003.xhtml#resume-button",[],[("aria-controls","audio02"),("role","button"),("tabindex","0")]) [Str "resume"],Space,Span ("content-multimedia-003.xhtml#pause-button",[],[("aria-controls","audio02"),("role","button"),("tabindex","0")]) [Str "pause"],LineBreak]] -,Para [Str "If",Space,Str "the",Space,Str "\"resume\"",Space,Str "button",Space,Str "(re)starts",Space,Str "playback",Space,Str "of",Space,Str "the",Space,Str "audio",Space,Str "clip",Space,Str "and",Space,Str "the",Space,Str "\"pause\"",Space,Str "button",Space,Str "halts",Space,Str "it,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "trigger-030"],Space,Str "The",Space,Code ("",[],[]) "trigger",Space,Str "element:",Space,Str "mute/unmute"] -,Para [Str "Tests",Space,Str "whether",Space,Str "muting",Space,Str "and",Space,Str "unmuting",Space,Str "of",Space,Str "multimedia",Space,Str "content",Space,Str "by",Space,Code ("",[],[]) "epub:trigger",Space,Str "elements",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") ""] -,Div ("",["trigger-ctrl"],[]) [Plain [Span ("content-multimedia-003.xhtml#mute-button",[],[("aria-controls","audio03"),("role","button"),("tabindex","0")]) [Str "mute"],Space,Span ("content-multimedia-003.xhtml#unmute-button",[],[("aria-controls","audio03"),("role","button"),("tabindex","0")]) [Str "unmute"],LineBreak]] -,Para [Str "After",Space,Str "initiating",Space,Str "playback",Space,Str "of",Space,Str "the",Space,Str "audio",Space,Str "clip,",Space,Str "if",Space,Str "the",Space,Str "\"mute\"",Space,Str "button",Space,Str "silences",Space,Str "the",Space,Str "audio",Space,Str "track",Space,Str "and",Space,Str "\"unmute\"",Space,Str "re-enables",Space,Str "it",Space,Str "(at",Space,Str "the",Space,Str "same",Space,Str "volume",Space,Str "as",Space,Str "before),",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "trigger-040"],Space,Str "The",Space,Code ("",[],[]) "trigger",Space,Str "element:",Space,Str "hide/show"] -,Para [Str "Tests",Space,Str "whether",Space,Str "content",Space,Str "can",Space,Str "be",Space,Str "hidden",Space,Str "and",Space,Str "revealed",Space,Str "by",Space,Code ("",[],[]) "epub:trigger",Space,Str "elements."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") ""] -,Div ("",["trigger-ctrl"],[]) [Plain [Span ("content-multimedia-003.xhtml#hide-button",[],[("aria-controls","audio04"),("role","button"),("tabindex","0")]) [Str "hide"],Space,Span ("content-multimedia-003.xhtml#show-button",[],[("aria-controls","audio04"),("role","button"),("tabindex","0")]) [Str "show"],LineBreak]] -,Para [Str "If",Space,Str "the",Space,Str "\"hide\"",Space,Str "button",Space,Str "hides",Space,Str "the",Space,Str "audio",Space,Str "player",Space,Str "and",Space,Str "the",Space,Str "\"show\"",Space,Str "button",Space,Str "reveals",Space,Str "it,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Para [Span ("content-ns-001.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,Header 2 ("content-ns-001.xhtml#ns",[],[]) [Str "Namespace",Space,Str "Support"] -,RawBlock (Format "html") "
" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "namespace-010"],Space,Str "Prefixes"] -,Para [Str "Tests",Space,Str "that",Space,Str "namespace",Space,Str "prefix",Space,Str "support",Space,Str "is",Space,Str "not",Space,Str "hard-coded",Space,Str "into",Space,Str "the",Space,Str "application."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "a",Space,Str "black",Space,Str "circle",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,Para [Str "If",Space,Str "SVG",Space,Str "is",Space,Str "not",Space,Str "supported,",Space,Str "this",Space,Str "test",Space,Str "will",Space,Str "fail",Space,Str "regardless",Space,Str "of",Space,Str "actual",Space,Str "namespace",Space,Str "prefix",Space,Str "support.",Space,Str "Prefix",Space,Str "support",Space,Str "will",Space,Str "need",Space,Str "to",Space,Str "be",Space,Str "manually",Space,Str "tested",Space,Str "against",Space,Str "a",Space,Str "supported",Space,Str "namespace."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" ,Para [Span ("content-mathml-001.xhtml",[],[]) []] ,RawBlock (Format "html") "
" ,Header 2 ("content-mathml-001.xhtml#mathml",[],[]) [Str "MathML"] @@ -235,210 +106,13 @@ ,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-026"],Str "BiDi,",Space,Str "RTL",Space,Str "and",Space,Str "Arabic",Space,Str "alphabets"] ,Para [Str "Tests",Space,Str "whether",Space,Str "right-to-left",Space,Str "and",Space,Str "Arabic",Space,Str "alphabets",Space,Str "are",Space,Str "supported."] ,Para [Math DisplayMath "{d\\left( s \\right)} = \\begin{cases}\n{\\sum\\limits_{{\\lbrack?\\rbrack} = 1}^{S}s^{\\lbrack?\\rbrack}} & {\\text{\1573\1584\1575\1603\1575\1606}s > 0} \\\\\n{\\int_{1}^{S}{s^{\\lbrack?\\rbrack}s}} & {\\text{\1573\1584\1575\1603\1575\1606}s \\in m} \\\\\n{T\\pi} & {\\text{\1594\1610\1585\1584\1604\1603}\\left( \\text{\1605\1593}\\pi \\simeq 3,141 \\right)} \\\\\n\\end{cases}"] -,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "the",Space,Str "following",Space,Str "image:",Space,Image [Str "a",Space,Str "piecewise",Space,Str "defined",Space,Str "function",Space,Str "in",Space,Str "Maghreb-style",Space,Str "notation"] ("img/Maghreb1.png",""),Str "."] +,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "the",Space,Str "following",Space,Str "image:"] ,RawBlock (Format "html") "
" ,RawBlock (Format "html") "
" ,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-027"],Str "Elementary",Space,Str "math:",Space,Str "long",Space,Str "division",Space,Str "notation"] ,Para [Str "Tests",Space,Str "whether",Space,Code ("",[],[]) "mlongdiv",Space,Str "elements",Space,Str "(from",Space,Str "elementary",Space,Str "math)",Space,Str "are",Space,Str "supported."] ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "the",Space,Str "following",Space,Str "image:",Space,Image [Str "A",Space,Str "long",Space,Str "division",Space,Str "dividing",Space,Str "1306",Space,Str "by",Space,Str "3,",Space,Str "presented",Space,Str "in",Space,Str "'lefttop'",Space,Str "(US)",Space,Str "notation"] ("img/ElementaryMathExample.png",""),Str "."] ,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "mathml-028"],Str "Multiscripts,",Space,Str "Greek",Space,Str "and",Space,Str "Gothic",Space,Str "alphabets"] -,Para [Str "Tests",Space,Str "whether",Space,Code ("",[],[]) "mmultiscript",Space,Str "elements",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "Greek",Space,Str "and",Space,Str "Gothic",Space,Str "alphabets",Space,Str "are",Space,Str "supported."] -,Para [Math DisplayMath "\\underset{}{\\overset{}{}}"] -,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "the",Space,Str "following",Space,Str "image:",Space,Image [Str "a",Space,Str "large",Space,Str "capital",Space,Str "Pi",Space,Str "with",Space,Str "Gothic",Space,Str "characters",Space,Str "as",Space,Str "multiscripts",Space,Str "which",Space,Str "in",Space,Str "turn",Space,Str "have",Space,Str "Greek",Space,Str "multiscripts"] ("img/multiscripts_and_greek_alphabet.png",""),Str "."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "" -,Para [Span ("content-svg-001.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,Header 2 ("",[],[]) [Str "SVG"] -,RawBlock (Format "html") "
" -,Header 3 ("",[],[]) [Str "Shapes"] -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-010"],Space,Str "Circle"] -,Para [Str "Tests",Space,Str "whether",Space,Str "simple",Space,Str "vector",Space,Str "shapes",Space,Str "are",Space,Str "supported",Space,Str "by",Space,Str "drawing",Space,Str "a",Space,Str "circle."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "a",Space,Str "black",Space,Str "circle",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-020"],Space,Str "Transformation"] -,Para [Str "Tests",Space,Str "whether",Space,Str "simple",Space,Str "vector",Space,Str "shape",Space,Str "transformations",Space,Str "are",Space,Str "supported",Space,Str "by",Space,Str "transforming",Space,Str "a",Space,Str "square",Space,Str "into",Space,Str "a",Space,Str "diamond."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "a",Space,Str "black",Space,Str "diamond",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Para [Span ("content-svg-002.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,Header 3 ("",[],[]) [Str "Text",Space,Str "content"] -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Str "Styling"] -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-110"],Space,Code ("",[],[]) "letter-spacing"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "letter-spacing",Space,Str "attribute",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "letter-spacing",Space,Str "set",Space,Str "to",Space,Str "-1",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "default",Space,Str "letter-spacing",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "letter-spacing",Space,Str "set",Space,Str "to",Space,Str "3",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "space",Space,Str "between",Space,Str "letters",Space,Str "is",Space,Str "different",Space,Str "for",Space,Str "each",Space,Str "line,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-120"],Space,Code ("",[],[]) "word-spacing"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "word-spacing",Space,Str "attribute",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "word-spacing",Space,Str "set",Space,Str "to",Space,Str "-3",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "default",Space,Str "word-spacing",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "word-spacing",Space,Str "set",Space,Str "to",Space,Str "8",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "space",Space,Str "between",Space,Str "words",Space,Str "is",Space,Str "different",Space,Str "for",Space,Str "each",Space,Str "line,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-130"],Space,Code ("",[],[]) "font-size"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "font-size",Space,Str "attribute",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "default",Space,Str "font-size",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "font-size",Space,Str "set",Space,Str "to",Space,Str "30",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "The",Space,Str "size",Space,Str "set",Space,Str "to",Space,Str "200%",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "size",Space,Str "of",Space,Str "the",Space,Str "two",Space,Str "last",Space,Str "lines",Space,Str "is",Space,Str "different",Space,Str "than",Space,Str "the",Space,Str "first",Space,Str "line,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-140"],Space,Code ("",[],[]) "font-weight"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "font-weight",Space,Str "attribute",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "default",Space,Str "font-weight",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "font-weight",Space,Str "set",Space,Str "to",Space,Str "bold",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "weight",Space,Str "of",Space,Str "the",Space,Str "second",Space,Str "line",Space,Str "is",Space,Str "different",Space,Str "than",Space,Str "the",Space,Str "first",Space,Str "line,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-150"],Space,Code ("",[],[]) "font-style"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "font-style",Space,Str "attribute",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "default",Space,Str "font-style",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "font-style",Space,Str "set",Space,Str "to",Space,Str "italic",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "font-style",Space,Str "of",Space,Str "the",Space,Str "second",Space,Str "line",Space,Str "is",Space,Str "different",Space,Str "than",Space,Str "the",Space,Str "first",Space,Str "line,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-160"],Space,Code ("",[],[]) "text-decoration",Space,Str "attribute"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "text-decoration",Space,Str "attribute",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "default",Space,Str "text-decoration",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "text-decoration",Space,Str "set",Space,Str "to",Space,Str "underline",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "text-decoration",Space,Str "set",Space,Str "to",Space,Str "line-through",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "second",Space,Str "line",Space,Str "is",Space,Str "underlined",Space,Str "and",Space,Str "the",Space,Str "third",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "through",Space,Str "the",Space,Str "text,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Str "Positioning"] -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-210"],Space,Str "Lines"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "x",Space,Str "and",Space,Code ("",[],[]) "y",Space,Str "attributes",Space,Str "on",Space,Code ("",[],[]) "text",Space,Str "elements",Space,Str "for",Space,Str "positioning",Space,Str "lines",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "First",Space,Str "text",Space,Str "line",Space,Str "using",Space,Str "SVG",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "Second",Space,Str "text",Space,Str "line",Space,Str "using",Space,Str "SVG",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "Third",Space,Str "and",Space,Str "last",Space,Str "text",Space,Str "line",Space,Str "using",Space,Str "SVG",RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "vertical",Space,Str "alignment",Space,Str "of",Space,Str "the",Space,Str "three",Space,Str "lines",Space,Str "is",Space,Str "different,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-220"],Space,Str "Words",Space,Str "and",Space,Str "Characters"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Str "SVG",Space,Str "code",Space,Str "for",Space,Str "positioning",Space,Str "words",Space,Str "or",Space,Str "characters",Space,Str "is",Space,Str "supported",Space,Str "using",Space,Str "the",Space,Code ("",[],[]) "text",Space,Str "and",Space,Code ("",[],[]) "tspan",Space,Str "elements."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "This",Space,RawInline (Format "html") "",Str "i",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "s",RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "a",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "v",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "e",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "e",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "e",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "r",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "y",RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "b",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "i",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "i",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "i",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "g",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,Str "wave.",RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "text",Space,Str "\"This",Space,Str "is",Space,Str "a",Space,Str "veeery",Space,Str "biiig",Space,Str "wave\"",Space,Str "rises",Space,Str "and",Space,Str "falls",Space,Str "in",Space,Str "an",Space,Str "arc",Space,Str "like",Space,Str "a",Space,Str "wave,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-230"],Space,Str "Text:",Space,Code ("",[],[]) "path",Space,Str "element"] -,Para [Str "Tests",Space,Str "whether",Space,Str "positioning",Space,Str "text",Space,Str "on",Space,Str "a",Space,Str "path",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "The",Space,Str "text",Space,Str "follows",Space,Str "its",Space,Str "own",Space,Str "path.",Space,Str "Can",Space,Str "you",Space,Str "see",Space,Str "it?",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "text",Space,Str "follows",Space,Str "a",Space,Str "parabolic",Space,Str "path,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-240"],Space,Str "Text:",Space,Code ("",[],[]) "text",Space,Str "element",Space,Str "with",Space,Str "multiple",Space,Code ("",[],[]) "x",Space,Str "and",Space,Code ("",[],[]) "y",Space,Str "values"] -,Para [Str "Tests",Space,Str "whether",Space,Str "multiple",Space,Str "values",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "x",Space,Str "and",Space,Code ("",[],[]) "y",Space,Str "attributes",Space,Str "are",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "Multiple",Space,Str "x",Space,Str "y",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "text",Space,Str "goes",Space,Str "down,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Str "Rotating"] -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-310"],Space,Code ("",[],[]) "rotate"] -,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "rotate",Space,Str "attribute",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "This",Space,Str "text",Space,Str "is",Space,Str "rotated",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "characters",Space,Str "in",Space,Str "the",Space,Str "preceding",Space,Str "sentence",Space,Str "are",Space,Str "rotated,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 5 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-320"],Space,Code ("",[],[]) "transform"] -,Para [Str "Tests",Space,Str "whether",Space,Code ("",[],[]) "transform",Space,Str "attribute",Space,Str "(translate",Space,Str "and",Space,Str "rotate",Space,Str "values)",Space,Str "are",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "90",Space,Str "degrees",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "-90",Space,Str "degrees",RawInline (Format "html") "",Space,RawInline (Format "html") "",Str "180",Space,Str "degrees",RawInline (Format "html") "",Space,RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "each",Space,Str "line",Space,Str "of",Space,Str "text",Space,Str "is",Space,Str "rotated",Space,Str "by",Space,Str "the",Space,Str "degree",Space,Str "it",Space,Str "indicates,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Para [Span ("content-svg-003.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,Header 3 ("",[],[]) [Str "XHTML",Space,Str "Support"] -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-410"],Space,Code ("",[],[]) "img"] -,Para [Str "Tests",Space,Str "whether",Space,Str "SVG",Space,Str "is",Space,Str "supported",Space,Str "in",Space,Code ("",[],[]) "img",Space,Str "elements."] -,Para [Image [Str "a",Space,Str "grey",Space,Str "circle"] ("svg/circle.svg","")] -,Para [Str "If",Space,Str "a",Space,Str "grey",Space,Str "circle",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-420"],Space,Code ("",[],[]) "object"] -,Para [Str "Tests",Space,Str "whether",Space,Str "SVG",Space,Str "is",Space,Str "supported",Space,Str "in",Space,Code ("",[],[]) "object",Space,Str "elements."] -,Para [RawInline (Format "html") ""] -,Para [Str "FAIL"] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "a",Space,Str "circle",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-430"],Space,Code ("",[],[]) "background-image",Space,Str "(CSS)"] -,Para [Str "Tests",Space,Str "whether",Space,Str "SVG",Space,Str "is",Space,Str "supported",Space,Str "when",Space,Str "set",Space,Str "using",Space,Str "the",Space,Str "CSS",Space,Code ("",[],[]) "background-image",Space,Str "property."] -,Para [Str "If",Space,Str "a",Space,Str "grey",Space,Str "circle",Space,Str "is",Space,Str "rendered",Space,Str "at",Space,Str "the",Space,Str "right",Space,Str "bottom",Space,Str "of",Space,Str "this",Space,Str "section,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Para [Span ("content-svg-004.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,Header 3 ("",[],[]) [Str "Image",Space,Str "Embedding"] -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "svg-510"],Space,Str "Bitmaps"] -,Para [Str "Tests",Space,Str "whether",Space,Str "bitmap",Space,Str "images",Space,Str "can",Space,Str "be",Space,Str "embedded",Space,Str "in",Space,Str "an",Space,Str "SVG",Space,Str "image."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "a",Space,Str "black",Space,Str "circle",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Para [Span ("content-fallbacks.xhtml",[],[]) []] -,Header 1 ("",[],[]) [Str "Fallbacks"] -,Para [Str "This",Space,Str "section",Space,Str "contains",Space,Str "tests",Space,Str "for",Space,Str "Fallbacks."] -,Para [Span ("content-bindings-001.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,Header 3 ("",[],[]) [Str "Bindings"] -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],Space,Span ("",["test-id"],[]) [Str "bindings-010"],Space,Code ("",[],[]) "bindings"] -,Para [Str "Tests",Space,Str "whether",Space,Str "bindings",Space,Str "on",Space,Code ("",[],[]) "object",Str "s",Space,Str "are",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") "",RawInline (Format "html") ""] -,Para [Str "FAIL"] -,Para [Str "The",Space,Str "slideshow",Space,Str "binding",Space,Str "was",Space,Str "not",Space,Str "called"] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"PASS\",",Space,Str "the",Space,Str "test",Space,Str "passes.",Space,Str "Other",Space,Str "messages",Space,Str "may",Space,Str "indicate",Space,Str "partial",Space,Str "support."] -,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "support",Space,Str "scripting,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Para [Span ("content-fallbacks-001.xhtml",[],[]) []] -,RawBlock (Format "html") "
" -,Header 2 ("",[],[]) [Str "Fallbacks"] -,RawBlock (Format "html") "
" -,Header 3 ("",[],[]) [Str "Manifest"] -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "fallback-010"],Space,Str "Image",Space,Str "fallbacks"] -,Para [Str "Tests",Space,Str "whether",Space,Str "manifest",Space,Str "fallbacks",Space,Str "for",Space,Str "non-core",Space,Str "image",Space,Str "media",Space,Str "types",Space,Str "are",Space,Str "supported."] -,Para [Image [Str "test"] ("img/nonimage.xyz","")] -,Para [Str "If",Space,Str "an",Space,Str "image",Space,Str "of",Space,Str "a",Space,Str "checkmark",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "fallback-020"],Space,Str "Inline",Space,Str "frame",Space,Str "fallbacks"] -,Para [Str "Tests",Space,Str "whether",Space,Str "manifest",Space,Str "fallbacks",Space,Str "for",Space,Str "non-core",Space,Str "media",Space,Str "types",Space,Str "used",Space,Str "in",Space,Code ("",[],[]) "iframe",Str "s",Space,Str "are",Space,Str "supported."] -,Para [RawInline (Format "html") ""] -,Para [Str "If",Space,Str "an",Space,Str "image",Space,Str "of",Space,Str "a",Space,Str "checkmark",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "fallback-030"],Space,Str "Embed",Space,Str "fallbacks"] -,Para [Str "Tests",Space,Str "whether",Space,Str "manifest",Space,Str "fallbacks",Space,Str "for",Space,Str "non-core",Space,Str "media",Space,Str "types",Space,Str "used",Space,Str "in",Space,Code ("",[],[]) "embed",Str "s",Space,Str "are",Space,Str "supported."] -,RawBlock (Format "html") "" -,RawBlock (Format "html") "" -,Para [Str "If",Space,Str "an",Space,Str "image",Space,Str "of",Space,Str "a",Space,Str "checkmark",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" -,Header 3 ("",[],[]) [Str "Intrinsic"] -,RawBlock (Format "html") "
" -,Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "fallback-040"],Space,Str "Object",Space,Str "fallbacks"] -,Para [Str "Tests",Space,Str "whether",Space,Code ("",[],[]) "object",Str "'s",Space,Str "intrinsic",Space,Str "fallback",Space,Str "mechanism",Space,Str "for",Space,Str "non-core",Space,Str "media",Space,Str "types",Space,Str "is",Space,Str "supported."] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "PASS"] -,Para [RawInline (Format "html") "",Space,RawInline (Format "html") ""] -,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"PASS\",",Space,Str "the",Space,Str "test",Space,Str "passes."] -,RawBlock (Format "html") "
" -,RawBlock (Format "html") "
" ,RawBlock (Format "html") "
" ,Para [Span ("content-switch-001.xhtml",[],[]) []] ,RawBlock (Format "html") "
" @@ -457,8 +131,5 @@ ,Para [Str "If",Space,Str "test",Space,Code ("",[],[]) "switch-010",Space,Str "did",Space,Str "not",Space,Str "pass,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."] ,RawBlock (Format "html") "
" ,RawBlock (Format "html") "" -,Para [Span ("svg-doc-001.xhtml",[],[]) []] -,Header 1 ("",[],[]) [Str "Content",Space,Str "Documents:",Space,Str "SVG"] -,Para [Str "This",Space,Str "section",Space,Str "contains",Space,Str "tests",Space,Str "for",Space,Str "static",Space,Str "SVG",Space,Str "content."] -,Para [Str "Note",Space,Str "that",Space,Str "if",Space,Str "no",Space,Str "SVG",Space,Str "tests",Space,Str "appear",Space,Str "after",Space,Str "this",Space,Str "document,",Space,Str "SVG",Space,Str "is",Space,Str "not",Space,Str "supported",Space,Str "in",Space,Str "the",Space,Str "spine",Space,Str "and",Space,Str "all",Space,Str "tests",Space,Str "in",Space,Str "this",Space,Str "section",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."] -,Para [Span ("content-svg-001.svg",[],[]) []]] +,Para [Span ("Maghreb1.png",[],[]) []] +,Para [Image [] ("img/Maghreb1.png","")]] diff --git a/tests/test-pandoc.hs b/tests/test-pandoc.hs index e6924f6b2..7e4f4732c 100644 --- a/tests/test-pandoc.hs +++ b/tests/test-pandoc.hs @@ -11,6 +11,7 @@ import qualified Tests.Readers.Org import qualified Tests.Readers.RST import qualified Tests.Readers.Docx import qualified Tests.Readers.Txt2Tags +import qualified Tests.Readers.EPUB import qualified Tests.Writers.ConTeXt import qualified Tests.Writers.LaTeX import qualified Tests.Writers.HTML @@ -44,6 +45,7 @@ tests = [ testGroup "Old" Tests.Old.tests , testGroup "RST" Tests.Readers.RST.tests , testGroup "Docx" Tests.Readers.Docx.tests , testGroup "Txt2Tags" Tests.Readers.Txt2Tags.tests + , testGroup "EPUB" Tests.Readers.EPUB.tests ] ]