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