aboutsummaryrefslogtreecommitdiff
path: root/test/Spec.hs
diff options
context:
space:
mode:
authorBrad Richardson <brichardson@structint.com>2020-04-13 19:10:39 -0500
committerBrad Richardson <brichardson@structint.com>2020-04-29 19:08:05 -0700
commit32af0dea4bfa1aa30525048ddcd91f74727e2a52 (patch)
tree81e222e66e3b7e4c3cac8cfdf5674403e279dae3 /test/Spec.hs
parente4829d620dd9c5261880cee92f49da43f2a8ed20 (diff)
downloadfpm-32af0dea4bfa1aa30525048ddcd91f74727e2a52.tar.gz
fpm-32af0dea4bfa1aa30525048ddcd91f74727e2a52.zip
Simplify the tests
Diffstat (limited to 'test/Spec.hs')
-rw-r--r--test/Spec.hs19
1 files changed, 5 insertions, 14 deletions
diff --git a/test/Spec.hs b/test/Spec.hs
index c9ec08c..fe6f99c 100644
--- a/test/Spec.hs
+++ b/test/Spec.hs
@@ -1,20 +1,11 @@
import Development.Shake.FilePath ( (</>) )
+import System.Directory ( withCurrentDirectory )
import System.Process ( callCommand )
main :: IO ()
main = do
- someFunc
- someFunc2
+ testExampleProject
-someFunc :: IO ()
-someFunc = do
- putStrLn "someFunc"
- a <- callCommand "gfortran test/test1.f90 -o test1"
- a <- callCommand $ "." </> "test1"
- return ()
-
-someFunc2 :: IO ()
-someFunc2 = do
- putStrLn "example"
- a <- callCommand "cd example_project && stack run -- build"
- return ()
+testExampleProject :: IO ()
+testExampleProject =
+ withCurrentDirectory "example_project" $ callCommand "stack run -- build"