summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2008-01-19 10:12:15 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2008-01-19 10:12:15 +0100
commit2319cc88cf8b1616cae77dd4319d8c86873579f1 (patch)
treebe1ed30b751f6d589eb67eaf1840a379f691aa33 /Main.hs
parent767e9cbd95767542f366e57fe8a6b6b06a720ada (diff)
downloadmetatile-2319cc88cf8b1616cae77dd4319d8c86873579f1.tar
metatile-2319cc88cf8b1616cae77dd4319d8c86873579f1.zip
Roll testing into the main executable, use Cabal to build the tests
darcs-hash:20080119091215-a5988-8f5f48e8c40a0f39abdf6ffe4d4dc938ab8c7ef1
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Main.hs b/Main.hs
index 006d738..2be135c 100644
--- a/Main.hs
+++ b/Main.hs
@@ -22,6 +22,10 @@ import System.Info
import System.Environment
import System.Posix.Process (executeFile)
+#ifdef TESTING
+import qualified Properties
+#endif
+
-- | The entry point into xmonad. Attempts to compile any custom main
-- for xmonad, and if it doesn't find one, just launches the default.
main :: IO ()
@@ -34,6 +38,9 @@ main = do
["--recompile"] -> recompile False >> return ()
["--recompile-force"] -> recompile True >> return ()
["--version"] -> putStrLn "xmonad 0.5"
+#ifdef TESTING
+ ("--run-tests":_) -> Properties.main
+#endif
_ -> fail "unrecognized flags"
-- | Build "~/.xmonad/xmonad.hs" with ghc, then execute it. If there are no