aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Čertík <ondrej@certik.us>2020-02-28 09:16:46 -0800
committerOndřej Čertík <ondrej@certik.us>2020-02-28 09:16:46 -0800
commit12020ca91a0adf04c9ba4675e0126f042da4c121 (patch)
tree257d270bb8f88a45677053e16765819bb65745fd
parent5641e3d44d07c49b8b68786f1b7578f4bbdccc3d (diff)
downloadfpm-12020ca91a0adf04c9ba4675e0126f042da4c121.tar.gz
fpm-12020ca91a0adf04c9ba4675e0126f042da4c121.zip
Test example_project
-rw-r--r--src/Lib.hs9
-rw-r--r--test/Spec.hs6
2 files changed, 12 insertions, 3 deletions
diff --git a/src/Lib.hs b/src/Lib.hs
index cab1ccc..3d4aede 100644
--- a/src/Lib.hs
+++ b/src/Lib.hs
@@ -1,5 +1,6 @@
module Lib
- ( someFunc
+ ( someFunc,
+ someFunc2
) where
import Development.Shake.FilePath ((</>))
@@ -12,3 +13,9 @@ someFunc = do
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 ()
diff --git a/test/Spec.hs b/test/Spec.hs
index a1a07c6..1c9fc48 100644
--- a/test/Spec.hs
+++ b/test/Spec.hs
@@ -1,4 +1,6 @@
-import Lib (someFunc)
+import Lib (someFunc, someFunc2)
main :: IO ()
-main = someFunc
+main = do
+ someFunc
+ someFunc2