-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClojure.hs
More file actions
39 lines (30 loc) · 1.13 KB
/
Clojure.hs
File metadata and controls
39 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{-# OPTIONS_GHC -fno-warn-unused-top-binds #-}
module Spec.Tests.Clojure (tests) where
import Data.String.Interpolate
import Language.LSP.Protocol.Types
import Test.Sandwich as Sandwich
import TestLib.JupyterRunnerContext
import TestLib.LSP
import TestLib.NixEnvironmentContext
import TestLib.NixTypes
import TestLib.TestSearchers
import TestLib.Types
kernelSpec :: NixKernelSpec
kernelSpec = NixKernelSpec {
nixKernelName = "clojure"
, nixKernelChannel = "codedown"
, nixKernelDisplayName = Just "Clojure"
, nixKernelPackages = []
, nixKernelMeta = Nothing
, nixKernelIcon = Nothing
, nixKernelExtraConfig = Nothing
}
tests :: LanguageSpec
tests = describe "Clojure" $ introduceNixEnvironment [kernelSpec] [] "Clojure" $ introduceJupyterRunner $ do
testKernelSearchersBuild "clojure"
testHasExpectedFields "clojure"
testKernelStdout "clojure" [__i|(println "hi")|] "hi\n"
testDiagnostics "clojure-lsp" "test.clj" LanguageKind_Clojure [__i|(foo 42)|] $ \diagnostics -> do
assertDiagnosticRanges diagnostics [(Range (Position 0 1) (Position 0 4), Just (InR "unresolved-symbol"))]
main :: IO ()
main = jupyterMain tests