From debb8785f27d176f5e6ea8b471c606b07feaae8b Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Thu, 19 Apr 2007 00:47:25 +0200 Subject: tweak loc count to match count_lines script darcs-hash:20070418224725-9c5c1-e885b1392c8f6aaa1ccd5c5cbcdc9c41b29b6b6a --- tests/loc.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/loc.hs b/tests/loc.hs index 7911b9a..289c629 100644 --- a/tests/loc.hs +++ b/tests/loc.hs @@ -2,7 +2,7 @@ import Control.Monad import System.Exit main = do foo <- getContents - let actual_loc = filter isntcomment $ + let actual_loc = filter (not.null) $ filter isntcomment $ map (dropWhile (==' ')) $ lines foo loc = length actual_loc putStrLn $ show loc @@ -12,4 +12,5 @@ main = do foo <- getContents isntcomment "" = False isntcomment ('-':'-':_) = False +isntcomment ('{':'-':_) = False -- pragmas isntcomment _ = True -- cgit v1.2.3