diff options
author | Simon Hengel <sol@typeful.net> | 2012-08-25 13:49:04 +0200 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2012-08-28 07:39:14 +0200 |
commit | dd941462345ad638fd00d661e2a3ca239a259ab2 (patch) | |
tree | 2e7cece45acaff3eb6bd64810f0daae7cf8ff9d9 | |
parent | 16cdfa33ce7a043465a653d87e04c746ab10a797 (diff) |
accept.hs: Ignore some files
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | tests/html-tests/accept.hs | 9 |
2 files changed, 8 insertions, 5 deletions
@@ -1,6 +1,2 @@ /dist/ /doc/haddock -/tests/html-tests/output/ -/tests/html-tests/tests/doc-index.html.ref -/tests/html-tests/tests/index-frames.html.ref -/tests/html-tests/tests/index.html.ref diff --git a/tests/html-tests/accept.hs b/tests/html-tests/accept.hs index 49da5c5a..45b32078 100644 --- a/tests/html-tests/accept.hs +++ b/tests/html-tests/accept.hs @@ -5,17 +5,24 @@ import System.Exit import System.Directory import Data.List import Control.Monad +import Control.Applicative main = do args <- getArgs dir <- getCurrentDirectory - contents <- getDirectoryContents (dir </> "output") + contents <- filter (`notElem` ignore) <$> getDirectoryContents (dir </> "output") if not $ null args then mapM_ copy [ "output" </> file | file <- contents, ".html" `isSuffixOf` file, takeBaseName file `elem` args ] else mapM_ copy [ "output" </> file | file <- contents, ".html" `isSuffixOf` file ] + where + ignore = [ + "doc-index.html" + , "index-frames.html" + , "index.html" + ] copy file = do |