3import Control.Monad (unless)
4import Data.List (isInfixOf)
10import Elm.Internal.Paths as Elm
14 top <- getCurrentDirectory
16 -- setup submodules and npm
17 runCmd "git" ["submodule", "update", "--init"]
18 out <- readProcess "npm" ["ls", "--parseable"] ""
19 unless ("jsdom" `isInfixOf` out) $ runCmd "npm" ["install","jsdom"]
21 -- setup actual library tests
22 let localCompiler = joinPath [ "dist", "build", "elm", "elm" ]
23 runCmd localCompiler [ "--make"
26 , "--src-dir=Elm-Test"
27 , "--src-dir=" ++ "tests" </> "libraries"
32 let files = [ "IO" </> "share" </> "prescript.js"
34 , "build" </> testFile <.> "js"
35 , "IO" </> "share" </> "handler.js"
37 testRunner = "build" </> "TestRunner.js"
38 exe <- readProcess "cat" files ""
39 writeFile testRunner exe
40 exitCode <- rawSystem "node" [testRunner]
41 removeDirectoryRecursive "cache"
42 removeDirectoryRecursive "build"
45 testFile = "tests" </> "libraries" </> "Test"
47runCmd :: String -> [String] -> IO ()
49 putStrLn (cmd ++ " " ++ unwords args)
50 (exitCode, stdout, stderr) <- readProcessWithExitCode cmd args ""
54 ExitSuccess -> return ()
55 ExitFailure _ -> exitWith exitCode
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list