update equality function
[lsp-test.git] / lsp-test.cabal
1 name:                lsp-test
2 version:             0.13.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   @Language.LSP.Test@ launches your server as a subprocess and allows you to simulate a session
8   down to the wire, and @Language.LSP.Test@ can replay captured sessions from
9   <haskell-lsp https://hackage.haskell.org/package/haskell-lsp>.
10   To see examples of it in action, check out <https://github.com/haskell/haskell-ide-engine haskell-ide-engine>,
11   <https://github.com/haskell/haskell-language-server haskell-language-server> and
12   <https://github.com/digital-asset/ghcide ghcide>.
13 homepage:            https://github.com/bubba/lsp-test#readme
14 license:             BSD3
15 license-file:        LICENSE
16 author:              Luke Lau
17 maintainer:          luke_lau@icloud.com
18 bug-reports:         https://github.com/bubba/lsp-test/issues
19 copyright:           2021 Luke Lau
20 category:            Testing
21 build-type:          Simple
22 cabal-version:       2.0
23 extra-source-files:  README.md
24                    , ChangeLog.md
25 tested-with:         GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1, GHC == 8.10.2
26
27 source-repository head
28   type:     git
29   location: https://github.com/bubba/lsp-test/
30
31 Flag DummyServer
32   Description: Build the dummy server executable used in testing
33   Default:     False
34   Manual:      True
35
36 library
37   hs-source-dirs:      src
38   exposed-modules:     Language.LSP.Test
39   reexported-modules:  lsp-types:Language.LSP.Types
40                      , lsp-types:Language.LSP.Types.Capabilities
41                      , parser-combinators:Control.Applicative.Combinators
42   default-language:    Haskell2010
43   build-depends:       base >= 4.10 && < 5
44                      , lsp-types == 1.1.*
45                      , aeson
46                      , time
47                      , aeson-pretty
48                      , ansi-terminal
49                      , async
50                      , bytestring
51                      , conduit
52                      , conduit-parse == 0.2.*
53                      , containers >= 0.5.9
54                      , data-default
55                      , Diff
56                      , directory
57                      , filepath
58                      , Glob >= 0.9 && < 0.11
59                      , lens
60                      , mtl
61                      , parser-combinators >= 1.2
62                      , process >= 1.6
63                      , text
64                      , transformers
65                      , unordered-containers
66                      , some
67   if os(windows)
68     build-depends:     Win32
69   else
70     build-depends:     unix
71   other-modules:       Language.LSP.Test.Compat
72                        Language.LSP.Test.Decoding
73                        Language.LSP.Test.Exceptions
74                        Language.LSP.Test.Files
75                        Language.LSP.Test.Parsing
76                        Language.LSP.Test.Server
77                        Language.LSP.Test.Session
78   ghc-options:         -W
79
80 executable dummy-server
81   main-is:             Main.hs
82   hs-source-dirs:      test/dummy-server
83   ghc-options:         -W
84   build-depends:       base >= 4.11 && < 5
85                      , lsp == 1.1.*
86                      , aeson
87                      , unordered-containers
88                      , directory
89                      , filepath
90                      , unliftio
91                      , mtl
92   default-language:    Haskell2010
93   scope:               private
94   if !flag(DummyServer)
95     buildable:         False
96
97 test-suite tests
98   type:                exitcode-stdio-1.0
99   main-is:             Test.hs
100   hs-source-dirs:      test
101   ghc-options:         -W
102   build-depends:       base >= 4.10 && < 5
103                      , hspec
104                      , lens
105                      , lsp-types == 1.1.*
106                      , lsp-test
107                      , data-default
108                      , aeson
109                      , unordered-containers
110                      , text
111                      , directory
112                      , filepath
113   default-language:    Haskell2010
114   build-tool-depends:  lsp-test:dummy-server