diff options
author | Brad Richardson <brichardson@structint.com> | 2020-04-13 18:57:17 -0500 |
---|---|---|
committer | Brad Richardson <brichardson@structint.com> | 2020-04-29 19:08:05 -0700 |
commit | e4829d620dd9c5261880cee92f49da43f2a8ed20 (patch) | |
tree | 1f26aa87b2ce0d8a55f1f0dd325bdc5a794525d2 | |
parent | a8dabeea48210450e6b1088c95abf80358f40e3c (diff) | |
download | fpm-e4829d620dd9c5261880cee92f49da43f2a8ed20.tar.gz fpm-e4829d620dd9c5261880cee92f49da43f2a8ed20.zip |
Move test code out of src folder
-rw-r--r-- | src/Lib.hs | 21 | ||||
-rw-r--r-- | test/Spec.hs | 20 |
2 files changed, 17 insertions, 24 deletions
diff --git a/src/Lib.hs b/src/Lib.hs deleted file mode 100644 index 3d4aede..0000000 --- a/src/Lib.hs +++ /dev/null @@ -1,21 +0,0 @@ -module Lib - ( someFunc, - someFunc2 - ) where - -import Development.Shake.FilePath ((</>)) -import System.Process (callCommand) - - -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 () diff --git a/test/Spec.hs b/test/Spec.hs index 1c9fc48..c9ec08c 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -1,6 +1,20 @@ -import Lib (someFunc, someFunc2) +import Development.Shake.FilePath ( (</>) ) +import System.Process ( callCommand ) main :: IO () main = do - someFunc - someFunc2 + someFunc + someFunc2 + +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 () |