[project @ 2001-05-21 15:25:24 by simonmar]
[ghc-hetmet.git] / ghc / tests / lib / Directory / getDirectoryContents001.hs
index 829a9f9..7c48a93 100644 (file)
@@ -1,7 +1,9 @@
 import Directory (getDirectoryContents)
-import List (sort, isPrefixOf)
+import List (sort, isPrefixOf, isSuffixOf)
 
 main = do
     names <- getDirectoryContents "."
-    let names' = filter (isPrefixOf "io009") names
-    putStrLn (unlines (sort names'))
+    putStrLn (unlines (sort (filter ok names)))
+
+ok name = "getDirectoryContents" `isPrefixOf` name 
+         && not ("bak" `isSuffixOf` name)