diff options
author | David Roundy <droundy@darcs.net> | 2007-04-18 02:45:33 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-04-18 02:45:33 +0200 |
commit | 72d6c0cc3bf264273256374f2065f6967c46f53b (patch) | |
tree | 652ca563a06f6e200cab8b7f6c6105cb6562fea5 /tests | |
parent | cf27eba1ac38e22fa266011f8505cff097293e04 (diff) | |
download | metatile-72d6c0cc3bf264273256374f2065f6967c46f53b.tar metatile-72d6c0cc3bf264273256374f2065f6967c46f53b.zip |
define test to ensure LOC doesn't jump above 400.
darcs-hash:20070418004533-72aca-d701954d2a24ceca7791e92c12a35c299b8272ff
Diffstat (limited to 'tests')
-rw-r--r-- | tests/loc.hs | 15 |
1 files changed, 15 insertions, 0 deletions
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 |