8c7183638c67f99e3762781f79a970b7dfea9df9
[packages/filepath.git] / tests / test.bat
1 @echo off
2
3 if "%1" == "help" goto help
4
5 echo Generating test script
6 runhaskell GenTests
7
8 if "%1" == "hpc" goto hpc
9 if "%1" == "ghci" goto ghci
10
11 runhaskell -i.. -cpp -DTESTING FilePath_Test.hs
12 goto end
13
14
15 :ghci
16 ghci -i.. -cpp -DTESTING FilePath_Test.hs
17 goto end
18
19
20 :hpc
21 mkdir hpc 2> nul
22 mkdir hpc\System 2> nul
23 mkdir hpc\System\FilePath 2> nul
24 type AutoTest.hs > hpc\AutoTest.hs
25 type FilePath_Test.hs > hpc\FilePath_Test.hs
26 cpphs --noline -DTESTING ..\System\FilePath\Posix.hs > hpc\System\FilePath\Posix.hs
27 cpphs --noline -DTESTING ..\System\FilePath\Windows.hs > hpc\System\FilePath\Windows.hs
28 pushd hpc
29 ghc FilePath_Test.hs -o test --make -fhpc
30 test
31 hpc markup test.tix --exclude=AutoTest --exclude=Main
32 hpc report test.tix --exclude=AutoTest --exclude=Main
33 popd
34 goto end
35
36
37 :help
38 echo FilePath tester script
39 echo test Run the tests using runhaskell
40 echo test ghci Run the tests using ghci
41 echo test hpc Run the tests using hpc
42 goto end
43
44 :end