From 72d6c0cc3bf264273256374f2065f6967c46f53b Mon Sep 17 00:00:00 2001 From: David Roundy Date: Wed, 18 Apr 2007 02:45:33 +0200 Subject: define test to ensure LOC doesn't jump above 400. darcs-hash:20070418004533-72aca-d701954d2a24ceca7791e92c12a35c299b8272ff --- tests/loc.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/loc.hs diff --git a/tests/loc.hs b/tests/loc.hs new file mode 100644 index 0000000..cfc9985 --- /dev/null +++ b/tests/loc.hs @@ -0,0 +1,15 @@ +import Control.Monad +import System.Exit + +main = do foo <- getContents + let actual_loc = filter isntcomment $ + map (dropWhile (==' ')) $ lines foo + loc = length actual_loc + putStrLn $ show loc + -- uncomment the following to check for mistakes in isntcomment + -- putStr $ unlines $ actual_loc + when (loc > 400) $ fail "Too many lines of code!" + +isntcomment "" = False +isntcomment ('-':'-':_) = False +isntcomment _ = True -- cgit v1.2.3