From b07a5fcc4d9ea577e0918f683ba2fc1d82e55cd9 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Mon, 13 Apr 2020 19:31:08 -0500 Subject: Enable running the tests without external calls --- test/Spec.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/Spec.hs b/test/Spec.hs index 2fd2364..ccb3b24 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -1,6 +1,9 @@ import Development.Shake.FilePath ( () ) +import Fpm ( Arguments(..) + , Command(..) + , start + ) import System.Directory ( withCurrentDirectory ) -import System.Process ( callCommand ) main :: IO () main = do @@ -8,8 +11,8 @@ main = do testExampleProject :: IO () testExampleProject = - withCurrentDirectory "example_project" $ callCommand "stack run -- build" + withCurrentDirectory "example_project" $ start $ Arguments Build False testHelloWorld :: IO () testHelloWorld = - withCurrentDirectory "hello_world" $ callCommand "stack run -- run" + withCurrentDirectory "hello_world" $ start $ Arguments Run False -- cgit v1.2.3