on master help sign in
Test ghc and ghcjs project shells
commit0330ff9d33bebea52218e19a99b856244cbe43d2 authorAlexandre Esteves <alexandre.fmp.esteves@gmail.com> dateThu 17 May 2018, 17:27 (8 years ago) parent296321e
1 file changed+7
lib/selftest/src/Obelisk/SelfTest.hs+7
lib/selftest/src/Obelisk/SelfTest.hs+7
@@ -43,6 +43,13 @@ main = do
4343 it "can build ghcjs.frontend" $ inProj $ do
4444 run "nix-build" ["--no-out-link", "-A", "ghcjs.frontend"]
4545
46+ forM_ ["ghc", "ghcjs"] $ \compiler -> do
47+ let
48+ shell = "shells." <> compiler
49+ inShell cmd = run "nix-shell" $ ["-A", fromString shell, "--run", cmd]
50+ it ("can enter " <> shell) $ inProj $ inShell "exit"
51+ it ("can build in " <> shell) $ inProj $ inShell $ "cabal new-build --" <> fromString compiler <> " all"
52+
4653 it "can use ob run" $ inProj $ handle_sh (\case ExitSuccess -> pure (); e -> throw e) $ do
4754 runHandle "ob" ["run"] $ \stdout -> do
4855 (_, firstUri) <- obRun httpManager stdout