aboutsummaryrefslogtreecommitdiff
path: root/html-test/run.hs
diff options
context:
space:
mode:
authorŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-08-01 16:45:23 +0200
committerŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-08-22 23:40:26 +0200
commit0a7c9cc09882f4d0bd3a3c1b64d0ae8f2d7a2317 (patch)
tree2dc65edc6ef81059da7ed936070377572fa6faf7 /html-test/run.hs
parentac10a4ccbe416e8612c6ca49b9f19c3a6f4cf25f (diff)
Create script file for new HTML test runner.
Diffstat (limited to 'html-test/run.hs')
-rwxr-xr-xhtml-test/run.hs28
1 files changed, 28 insertions, 0 deletions
diff --git a/html-test/run.hs b/html-test/run.hs
new file mode 100755
index 00000000..71d78f73
--- /dev/null
+++ b/html-test/run.hs
@@ -0,0 +1,28 @@
+#!/usr/bin/env runhaskell
+{-# LANGUAGE CPP #-}
+
+
+import System.Environment
+import System.FilePath
+
+
+baseDir, rootDir :: FilePath
+baseDir = takeDirectory __FILE__
+rootDir = baseDir </> ".."
+
+srcDir, refDir, outDir :: FilePath
+srcDir = baseDir </> "src"
+refDir = baseDir </> "ref"
+outDir = baseDir </> "out"
+
+
+main :: IO ()
+main = do
+ files <- map processArg <$> getArgs
+ putStrLn $ "Files to test: " ++ show files
+
+
+processArg :: String -> FilePath
+processArg arg
+ | takeExtension arg `elem` [".hs", ".lhs"] = arg
+ | otherwise = srcDir </> arg <.> "hs"