1{-# LANGUAGE OverloadedStrings #-}
2module Tests.Readers.HTML (tests) where
4import Text.Pandoc.Definition
7import Text.Pandoc.Arbitrary()
8import Text.Pandoc.Builder
11html :: String -> Pandoc
12html = purely $ readHtml def
15tests = [ testGroup "base tag"
16 [ test html "simple" $
17 "<head><base href=\"http://www.w3schools.com/images/foo\" ></head><body><img src=\"stickman.gif\" alt=\"Stickman\"></head>" =?>
18 plain (image "http://www.w3schools.com/images/stickman.gif" "" (text "Stickman"))
19 , test html "slash at end of base" $
20 "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"stickman.gif\" alt=\"Stickman\"></head>" =?>
21 plain (image "http://www.w3schools.com/images/stickman.gif" "" (text "Stickman"))
22 , test html "slash at beginning of href" $
23 "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"/stickman.gif\" alt=\"Stickman\"></head>" =?>
24 plain (image "http://www.w3schools.com/stickman.gif" "" (text "Stickman"))
25 , test html "absolute URL" $
26 "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"http://example.com/stickman.gif\" alt=\"Stickman\"></head>" =?>
27 plain (image "http://example.com/stickman.gif" "" (text "Stickman"))
30 [ test html "anchor without href" $ "<a name=\"anchor\"/>" =?>
31 plain (spanWith ("anchor",[],[]) mempty)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list