diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..8f05d2cf --- /dev/null +++ b/appveyor.yml @@ -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 diff --git a/yesod-core/Yesod/Routes/Parse.hs b/yesod-core/Yesod/Routes/Parse.hs index b5be876a..580f23d6 100644 --- a/yesod-core/Yesod/Routes/Parse.hs +++ b/yesod-core/Yesod/Routes/Parse.hs @@ -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) diff --git a/yesod-static/test/FileGeneratorTests.hs b/yesod-static/test/FileGeneratorTests.hs index d1bffa34..98660724 100644 --- a/yesod-static/test/FileGeneratorTests.hs +++ b/yesod-static/test/FileGeneratorTests.hs @@ -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"