[commit: haddock] ghc-7.6: accept.hs: Ignore some files (dd94146)
Simon Hengel
sol at typeful.net
Sat Sep 1 11:57:05 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/haddock
On branch : ghc-7.6
http://hackage.haskell.org/trac/ghc/changeset/dd941462345ad638fd00d661e2a3ca239a259ab2
>---------------------------------------------------------------
commit dd941462345ad638fd00d661e2a3ca239a259ab2
Author: Simon Hengel <sol at typeful.net>
Date: Sat Aug 25 13:49:04 2012 +0200
accept.hs: Ignore some files
>---------------------------------------------------------------
.gitignore | 4 ----
tests/html-tests/accept.hs | 9 ++++++++-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/.gitignore b/.gitignore
index 9bf92b2..7fcbdc3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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 49da5c5..45b3207 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
More information about the Cvs-ghc
mailing list