Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Add test for Windows with AppVeyor #136

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions appveyor.yml
@@ -0,0 +1,24 @@
# Disabled cache in hope of improving reliability of AppVeyor builds
#cache:
#- "c:\\sr" # stack root, short paths == fewer problems

build: off

before_test:
# http://help.appveyor.com/discussions/problems/6312-curl-command-not-found
- set PATH=C:\Program Files\Git\mingw64\bin;%PATH%

- 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 install --jobs 1
- echo "" | stack --no-terminal test --jobs 1
6 changes: 3 additions & 3 deletions library/Test/Tasty/Generator.hs
Expand Up @@ -26,7 +26,7 @@ module Test.Tasty.Generator
import Data.Function (on)
import Data.List (find, groupBy, isPrefixOf, sortOn)
import Data.Maybe (fromJust)
import System.FilePath (dropExtension, pathSeparator)
import System.FilePath (dropExtension, isPathSeparator)

-- | The test type.
data Test = Test
Expand All @@ -36,8 +36,8 @@ data Test = Test

-- | 'Test' constructor.
mkTest :: FilePath -> String -> Test
mkTest = Test . chooser pathSeparator '.' . dropExtension
where chooser c1 c2 = map $ \c3 -> if c3 == c1 then c2 else c3
mkTest = Test . replacePathSepTo '.' . dropExtension
where replacePathSepTo c1 = map $ \c2 -> if isPathSeparator c2 then c1 else c2

-- | The generator type.
data Generator = Generator
Expand Down