aboutsummaryrefslogtreecommitdiff
path: root/test
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
parente4829d620dd9c5261880cee92f49da43f2a8ed20 (diff)
downloadfpm-32af0dea4bfa1aa30525048ddcd91f74727e2a52.tar.gz
fpm-32af0dea4bfa1aa30525048ddcd91f74727e2a52.zip
Simplify the tests
Diffstat (limited to 'test')
-rw-r--r--test/Spec.hs19
-rw-r--r--test/test1.f908
2 files changed, 5 insertions, 22 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"
diff --git a/test/test1.f90 b/test/test1.f90
deleted file mode 100644
index f577b58..0000000
--- a/test/test1.f90
+++ /dev/null
@@ -1,8 +0,0 @@
-program test1
-implicit none
-integer :: i
-i = 5+5
-print *, i
-print *, "Fortran test code executed"
-print *, "TESTS PASSED"
-end program