diff options
Diffstat (limited to 'html-test')
-rwxr-xr-x | html-test/run.hs | 28 |
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" |