packages feed

sandwich 0.1.1.0 → 0.1.1.1

raw patch · 3 files changed

+18/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -2,6 +2,10 @@  ## Unreleased changes +## 0.1.1.1++* Fix error symlink creation on Windows (don't allow invalid characters).+ ## 0.1.1.0  * Be able to accept multiple `--filter/-f` arguments. A test must match all of them to be run.
sandwich.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           sandwich-version:        0.1.1.0+version:        0.1.1.1 synopsis:       Yet another test framework for Haskell description:    Please see the <https://codedownio.github.io/sandwich documentation>. category:       Testing
src/Test/Sandwich/Interpreters/RunTree/Util.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE CPP #-}  module Test.Sandwich.Interpreters.RunTree.Util where @@ -81,10 +82,19 @@     padding = if | numSiblings == 1 -> ""                  | otherwise -> paddedNumber <> "_" -fixupName = replace '/' '_' -replace :: Eq a => a -> a -> [a] -> [a]-replace a b = map $ \c -> if c == a then b else c+charsToReplace :: [Char]+#ifdef mingw32_HOST_OS+charsToReplace = ['\\', '/', ':', '*', '?', '"', '<', '>', '|']+#else+charsToReplace = ['/']+#endif++fixupName :: String -> String+fixupName = replaceAll charsToReplace '_'+  where+    replaceAll :: Eq a => [a] -> a -> [a] -> [a]+    replaceAll from to = map $ \c -> if c `L.elem` from then to else c  truncateFileNameToLength :: Int -> String -> String truncateFileNameToLength len x | L.length x <= len = x