Browse Source

Preparations for test suite

master
Nicolas Lenz 5 months ago
parent
commit
136b219a7d
4 changed files with 32 additions and 4 deletions
  1. 2
    0
      app/Main.hs
  2. 16
    3
      katrin.cabal
  3. 12
    1
      package.yaml
  4. 2
    0
      test/Spec.hs

src/Main.hs → app/Main.hs View File

@@ -1,5 +1,7 @@
1 1
 module Main where
2 2
 
3
+import Katrin
4
+
3 5
 -- | An excellent main function.
4 6
 -- | ~ Chef Excellence
5 7
 main :: IO ()

+ 16
- 3
katrin.cabal View File

@@ -4,7 +4,7 @@ cabal-version: 1.12
4 4
 --
5 5
 -- see: https://github.com/sol/hpack
6 6
 --
7
+-- hash: ba304beebcb30ee15e768714c498d47eb5fc6a1eb185c60f27a665dc1a537a1b
7 8
 
8 9
 name:           katrin
9 10
 version:        0.0.0
@@ -26,7 +26,6 @@ source-repository head
26 26
 library
27 27
   exposed-modules:
28 28
       Katrin
29
-      Main
30 29
   other-modules:
31 30
       Paths_katrin
32 31
   hs-source-dirs:
@@ -39,10 +38,23 @@ library
39 38
 executable katrin
40 39
   main-is: Main.hs
41 40
   other-modules:
42
-      Katrin
43 41
       Paths_katrin
44 42
   hs-source-dirs:
45
-      src
43
+      app
44
+  ghc-options: -threaded -rtsopts -with-rtsopts=-N
45
+  build-depends:
46
+      base >=4.7 && <5
47
+    , katrin
48
+    , text
49
+  default-language: Haskell2010
50
+
51
+test-suite katrin-test
52
+  type: exitcode-stdio-1.0
53
+  main-is: Spec.hs
54
+  other-modules:
55
+      Paths_katrin
56
+  hs-source-dirs:
57
+      test
46 58
   ghc-options: -threaded -rtsopts -with-rtsopts=-N
47 59
   build-depends:
48 60
       base >=4.7 && <5

+ 12
- 1
package.yaml View File

@@ -23,7 +23,18 @@ library:
23 23
 executables:
24 24
   katrin:
25 25
     main: Main.hs
26
-    source-dirs: src
26
+    source-dirs: app
27
+    ghc-options:
28
+    - -threaded
29
+    - -rtsopts
30
+    - -with-rtsopts=-N
31
+    dependencies:
32
+    - katrin
33
+
34
+tests:
35
+  katrin-test:
36
+    main: Spec.hs
37
+    source-dirs: test
27 38
     ghc-options:
28 39
     - -threaded
29 40
     - -rtsopts

+ 2
- 0
test/Spec.hs View File

@@ -0,0 +1,2 @@
1
+main :: IO ()
2
+main = putStrLn "Test suite not yet implemented"

Loading…
Cancel
Save