5import qualified Data.Map as M
7import Control.Applicative ((<$>))
9import Test.Framework (testGroup)
10import Test.Framework.Providers.HUnit
11import Test.Framework.Providers.QuickCheck2
15import Text.Hakyll (runDefaultHakyll)
16import Text.Hakyll.File
19fileGroup = testGroup "File"
20 [ testCase "test_toRoot_1" test_toRoot_1
21 , testCase "test_toRoot_2" test_toRoot_2
22 , testCase "test_toRoot_3" test_toRoot_3
23 , testCase "test_inHakyllDirectory_1" test_inHakyllDirectory_1
24 , testCase "test_inHakyllDirectory_2" test_inHakyllDirectory_2
25 , testCase "test_inHakyllDirectory_3" test_inHakyllDirectory_3
26 , testCase "test_inHakyllDirectory_4" test_inHakyllDirectory_4
27 , testCase "test_removeSpaces_1" test_removeSpaces_1
28 , testCase "test_removeSpaces_2" test_removeSpaces_2
29 , testCase "test_havingExtension_1" test_havingExtension_1
30 , testCase "test_havingExtension_2" test_havingExtension_2
35test_toRoot_1 = toRoot "/posts/foo.html" @?= ".."
36test_toRoot_2 = toRoot "posts/foo.html" @?= ".."
37test_toRoot_3 = toRoot "foo.html" @?= "."
39-- inHakyllDirectory test cases
40test_inHakyllDirectory_1 =
41 (runDefaultHakyll $ inHakyllDirectory "_site/foo.html")
42 @? "test_inHakyllDirectory_1"
43test_inHakyllDirectory_2 =
44 (not <$> (runDefaultHakyll $ inHakyllDirectory "posts/foo.html"))
45 @? "test_inHakyllDirectory_2"
46test_inHakyllDirectory_3 =
47 (not <$> (runDefaultHakyll $ inHakyllDirectory "index.html"))
48 @? "test_inHakyllDirectory_3"
49test_inHakyllDirectory_4 =
50 (runDefaultHakyll $ inHakyllDirectory "_cache/index.html")
51 @? "test_inHakyllDirectory_4"
53-- removeSpaces test cases
54test_removeSpaces_1 = removeSpaces "$root/tags/random crap.html"
55 @?= "$root/tags/random-crap.html"
56test_removeSpaces_2 = removeSpaces "another simple example.zip"
57 @?= "another-simple-example.zip"
59-- Having extension test cases
60test_havingExtension_1 = havingExtension ".foo" ["file.bar", "file.txt"] @?= []
61test_havingExtension_2 = havingExtension ".foo" ["file.foo", "file.txt"]
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