Merge pull request #1342 from yesodweb/appveyor

Add appveyor.yml
This commit is contained in:
Michael Snoyman 2017-02-07 17:17:20 +02:00 committed by GitHub
commit 4920ca11eb
3 changed files with 19 additions and 2 deletions

16
appveyor.yml Normal file
View File

@ -0,0 +1,16 @@
build: off
before_test:
- curl -sS -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe
clone_folder: "c:\\stack"
environment:
global:
STACK_ROOT: "c:\\sr"
test_script:
- stack setup > nul
# The ugly echo "" hack is to avoid complaints about 0 being an invalid file
# descriptor
- echo "" | stack --no-terminal test

View File

@ -63,7 +63,7 @@ parseRoutesNoCheck = QuasiQuoter
-- invalid input.
resourcesFromString :: String -> [ResourceTree String]
resourcesFromString =
fst . parse 0 . filter (not . all (== ' ')) . lines
fst . parse 0 . filter (not . all (== ' ')) . lines . filter (/= '\r')
where
parse _ [] = ([], [])
parse indent (thisLine:otherLines)

View File

@ -78,7 +78,8 @@ fileGenSpecs = do
describe "Compress" $ do
it "compress tool function" $ do
out <- compressTool "runhaskell" [] "main = putStrLn \"Hello World\""
assertEqual "" "Hello World\n" out
-- 13 == CR, to make this test work on Windows
BL.filter (/= 13) out `shouldBe` "Hello World\n"
it "tryCompressTools" $ do
out <- flip tryCompressTools "abcdef"