[add selftest/ directory, add some tests to it and remove the old --selftest option from the main jhc executable
John Meacham <john@repetae.net>**20070608213739] adddir ./selftest
move ./SelfTest.hs ./selftest/SelfTest.hs
hunk ./Main.hs 64
-import SelfTest(selfTest)
hunk ./Main.hs 110
-        SelfTest      -> do
-            putStrLn "Starting self testing..."
-            SelfTest.selfTest (optArgs o)
hunk ./Options.hs 42
-          | SelfTest       -- ^ Perform self-test
hunk ./Options.hs 149
-    , Option []    ["selftest"]       (NoArg  (optMode_s SelfTest))    "Perform internal integrity testing"
addfile ./selftest/Makefile
hunk ./selftest/Makefile 1
+
+
+GHCOPTS= -fglasgow-exts -i.. -i../FrontEnd -O -ignore-package lang
+
+HC= ghc
+
+all: sha1 TestParse
+
+%: %.hs
+	$(HC) $(GHCOPTS) --make $< -o $@
hunk ./selftest/SelfTest.hs 1
-module SelfTest(selfTest) where
hunk ./selftest/SelfTest.hs 31
-{-# NOINLINE selfTest #-}
-selfTest :: [String] -> IO ()
-selfTest _ = do
+{-# NOINLINE main #-}
+main :: IO ()
+main = do
addfile ./selftest/TestParse.hs
hunk ./selftest/TestParse.hs 1
+
+
+import FrontEnd.Syn.Options
+
+
+main = do
+    cs <- getContents
+    print (parseOptions cs)
+
addfile ./selftest/sha1.hs
hunk ./selftest/sha1.hs 1
+
+import System
+
+import Util.SHA1
+
+main = do
+    as <- getArgs
+    xs <- mapM sha1file as
+    mapM_ print xs