Move example to separate cabal file
[opengl.git] / lsp-test.cabal
1 name:                lsp-test
2 version:             0.1.0.0
3 synopsis:            Functional test framework for LSP servers.
4 description:
5   A test framework for writing tests against 
6   <https://microsoft.github.io/language-server-protocol/ Language Server Protocol servers>.
7   @lsp-test@ launches your server as a subprocess and allows you to simulate a session
8   down to the wire.
9   Used for testing in <https://github.com/haskell/haskell-ide-engine haskell-ide-engine>.
10   > runSession "hie" fullCaps "path/to/root/dir" $ do
11   > doc <- openDoc "Desktop/simple.hs" "haskell"
12   > diags <- waitForDiagnostics
13   > let pos = Position 12 5
14   >     params = TextDocumentPositionParams doc
15   > hover <- request TextDocumentHover params
16 homepage:            https://github.com/Bubba/haskell-lsp-test#readme
17 license:             BSD3
18 license-file:        LICENSE
19 author:              Luke Lau
20 maintainer:          luke_lau@icloud.com
21 stability:           experimental
22 bug-reports:         https://github.com/Bubba/haskell-lsp-test/issues
23 copyright:           2018 Luke Lau
24 category:            Testing
25 build-type:          Simple
26 cabal-version:       2.0
27 extra-source-files:  README.md
28 tested-with:         GHC == 8.2.2 , GHC == 8.4.2 , GHC == 8.4.3
29
30 source-repository head
31   type:     git
32   location: https://github.com/Bubba/haskell-lsp-test/
33
34 library
35   hs-source-dirs:      src
36   exposed-modules:     Language.Haskell.LSP.Test
37                      , Language.Haskell.LSP.Test.Replay
38   reexported-modules:  haskell-lsp:Language.Haskell.LSP.Types
39                      , haskell-lsp:Language.Haskell.LSP.Types.Capabilities
40                      , parser-combinators:Control.Applicative.Combinators
41   default-language:    Haskell2010
42   build-depends:       base >= 4.7 && < 5
43                      , haskell-lsp >= 0.4
44                      , aeson
45                      , aeson-pretty
46                      , ansi-terminal
47                      , bytestring
48                      , conduit
49                      , conduit-parse
50                      , containers
51                      , data-default
52                      , Diff
53                      , directory
54                      , filepath
55                      , lens
56                      , mtl
57                      , parser-combinators
58                      , process
59                      , text
60                      , transformers
61                      , unordered-containers
62                      , yi-rope
63   if os(windows)
64     build-depends:     Win32
65   else
66     build-depends:     unix
67   other-modules:       Language.Haskell.LSP.Test.Capabilities
68                        Language.Haskell.LSP.Test.Compat
69                        Language.Haskell.LSP.Test.Decoding
70                        Language.Haskell.LSP.Test.Exceptions
71                        Language.Haskell.LSP.Test.Files
72                        Language.Haskell.LSP.Test.Messages
73                        Language.Haskell.LSP.Test.Parsing
74                        Language.Haskell.LSP.Test.Server
75                        Language.Haskell.LSP.Test.Session
76   ghc-options:         -W
77
78 test-suite tests
79   type:                exitcode-stdio-1.0
80   main-is:             Test.hs
81   hs-source-dirs:      test
82   ghc-options:         -W
83   build-depends:       base >= 4.7 && < 5
84                      , hspec
85                      , lens
86                      , data-default
87                      , haskell-lsp >= 0.4
88                      , lsp-test
89                      , aeson
90                      , unordered-containers
91                      , text
92   default-language:    Haskell2010
93