packages feed

shikensu 0.1.2 → 0.1.3

raw patch · 3 files changed

+22/−4 lines, 3 files

Files

shikensu.cabal view
@@ -1,5 +1,5 @@ name: shikensu-version: 0.1.2+version: 0.1.3 category: File IO  synopsis:
src/Shikensu/Contrib.hs view
@@ -147,7 +147,16 @@   prefixDirnameDef :: String -> Definition -> Definition-prefixDirnameDef prefix def = def { dirname = prefix ++ (dirname def) }+prefixDirnameDef prefix def =+  let+    newDirname = prefix ++ (dirname def)+  in+    def {+      dirname     = newDirname++    , parentPath  = compileParentPath $ newDirname+    , pathToRoot  = compilePathToRoot $ newDirname+    }   
tests/Test/Contrib.hs view
@@ -163,8 +163,17 @@     dictionary = fmap (Contrib.prefixDirname "prefix/") (list "tests/**/example.md")     definition = fmap List.head dictionary   in-    testCase "Should `prefixDirname`"-      $ definition `rmap` Shikensu.dirname >>= assertEq "prefix/fixtures"+    testGroup+      "PrefixDirname"+      [ testCase "Should have the correct `dirname`"+        $ definition `rmap` Shikensu.dirname >>= assertEq "prefix/fixtures"++      , testCase "Should have the correct `pathToRoot`"+        $ definition `rmap` Shikensu.pathToRoot >>= assertEq "../../"++      , testCase "Should have the correct `parentPath`"+        $ definition `rmap` Shikensu.parentPath >>= assertEq (Just "../")+      ]