[commit: ghc] wip/nfs-locking: Test findModuleFiles. (1136a62)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:52:26 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/1136a62c35dfe9df3774667b1e501494e2a496b1/ghc
>---------------------------------------------------------------
commit 1136a62c35dfe9df3774667b1e501494e2a496b1
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sun Feb 21 02:22:26 2016 +0000
Test findModuleFiles.
See #197, #210.
>---------------------------------------------------------------
1136a62c35dfe9df3774667b1e501494e2a496b1
src/Rules/Selftest.hs | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/Rules/Selftest.hs b/src/Rules/Selftest.hs
index f549b0f..f4890b0 100644
--- a/src/Rules/Selftest.hs
+++ b/src/Rules/Selftest.hs
@@ -6,6 +6,7 @@ import Development.Shake
import Test.QuickCheck
import Base
+import Oracles.ModuleFiles
import Settings.Builders.Ar (chunksOfSize)
import Way
@@ -26,6 +27,7 @@ selftestRules =
testMatchVersionedFilePath
testModuleNames
testLookupAll
+ testModuleFilesOracle
testWays :: Action ()
testWays = do
@@ -83,3 +85,14 @@ testLookupAll = do
dicts = nubBy ((==) `on` fst) <$> vector 20
extras :: Gen [Int]
extras = vector 20
+
+testModuleFilesOracle :: Action ()
+testModuleFilesOracle = do
+ putBuild $ "==== moduleFilesOracle"
+ result <- findModuleFiles ["compiler/codeGen", "compiler/parser"]
+ [ "CodeGen.Platform.ARM"
+ , "Lexer"
+ , "Missing.Module"]
+ test $ result == [ Just "compiler/codeGen/CodeGen/Platform/ARM.hs"
+ , Just "compiler/parser/Lexer.x"
+ , Nothing]
More information about the ghc-commits
mailing list