1{-# LANGUAGE OverloadedStrings #-}
2module Tests.Readers.HTML (tests) where
7import Text.Pandoc.Arbitrary ()
8import Text.Pandoc.Builder
10html :: String -> Pandoc
11html = purely $ readHtml def
14tests = [ testGroup "base tag"
15 [ test html "simple" $
16 "<head><base href=\"http://www.w3schools.com/images/foo\" ></head><body><img src=\"stickman.gif\" alt=\"Stickman\"></head>" =?>
17 plain (image "http://www.w3schools.com/images/stickman.gif" "" (text "Stickman"))
18 , test html "slash at end of base" $
19 "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"stickman.gif\" alt=\"Stickman\"></head>" =?>
20 plain (image "http://www.w3schools.com/images/stickman.gif" "" (text "Stickman"))
21 , test html "slash at beginning of href" $
22 "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"/stickman.gif\" alt=\"Stickman\"></head>" =?>
23 plain (image "http://www.w3schools.com/stickman.gif" "" (text "Stickman"))
24 , test html "absolute URL" $
25 "<head><base href=\"http://www.w3schools.com/images/\" ></head><body><img src=\"http://example.com/stickman.gif\" alt=\"Stickman\"></head>" =?>
26 plain (image "http://example.com/stickman.gif" "" (text "Stickman"))
29 [ test html "anchor without href" $ "<a name=\"anchor\"/>" =?>
30 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