From 0a7c9cc09882f4d0bd3a3c1b64d0ae8f2d7a2317 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Sat, 1 Aug 2015 16:45:23 +0200 Subject: Create script file for new HTML test runner. --- html-test/run.hs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 html-test/run.hs (limited to 'html-test/run.hs') 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" -- cgit v1.2.3