Move the generator
authorNeil Mitchell <ndmitchell@gmail.com>
Wed, 29 Oct 2014 07:31:51 +0000 (07:31 +0000)
committerNeil Mitchell <ndmitchell@gmail.com>
Wed, 29 Oct 2014 07:31:51 +0000 (07:31 +0000)
.ghci
Generate.hs [moved from tests/GenTests.hs with 95% similarity, mode: 0755]

diff --git a/.ghci b/.ghci
index 6676709..dc49947 100644 (file)
--- a/.ghci
+++ b/.ghci
@@ -7,4 +7,4 @@ import qualified System.FilePath.Posix as Posix
 :def docs_ const $ return $ unlines [":!cabal haddock"]
 :def docs const $ return $ unlines [":docs_",":!start dist\\doc\\html\\filepath\\System-FilePath.html"]
 
-:def test const $ return $ unlines [":!cd tests && runhaskell GenTests.hs",":!cabal test"]
+:def test const $ return $ unlines [":!runhaskell Generate.hs",":!cabal test"]
old mode 100644 (file)
new mode 100755 (executable)
similarity index 95%
rename from tests/GenTests.hs
rename to Generate.hs
index 722ffc0..53ec8c6
@@ -14,9 +14,9 @@ isExpr (Expr{}) = True
 isExpr _ = False
 
 
-main = do src <- readFile "../System/FilePath/Internal.hs"
+main = do src <- readFile "System/FilePath/Internal.hs"
           let tests = concatMap getTest $ zip [1..] (lines src)
-          writeFile "FilePath_Test.hs" (prefix ++ genTests tests)
+          writeFile "tests/FilePath_Test.hs" (prefix ++ genTests tests)
 
 prefix = unlines
     ["import AutoTest"