@@ -15,7 +15,7 @@ import Monad (runServerT)
1515import Server.AgdaLibResolver (findAgdaLib )
1616import qualified Server.Filesystem as FS
1717import Server.Model.AgdaLib (AgdaLibOrigin (FromFile ), agdaLibIncludes , agdaLibName , agdaLibOrigin )
18- import Server.Model.Monad (MonadAgdaLib , askAgdaLib , runWithAgdaLib )
18+ import Server.Model.Monad (MonadAgdaLib , askAgdaLib , runWithAgdaLib , runWithAgdaLibT )
1919import System.Directory (makeAbsolute )
2020import Test.Tasty (TestTree , testGroup )
2121import Test.Tasty.HUnit (testCase , (@?=) )
@@ -31,17 +31,7 @@ tests :: TestTree
3131tests =
3232 testGroup
3333 " Agda lib resolution"
34- [ testCase " Module without imports in lib without dependencies" $ do
35- model <- TestData. getModel
36-
37- LSP. runLspT undefined $ do
38- env <- TestData. getServerEnv model
39- runServerT env $ do
40- runWithAgdaLib (LSP. filePathToUri natPath) $ do
41- natSrc <- TestData. parseSourceFromPath natPath
42- _ <- indexFile natSrc
43- return () ,
44- testCase " Module with imports in lib without lib dependencies" $ do
34+ [ testCase " Explicit" $ do
4535 model <- TestData. getModel
4636
4737 absConstPath <- makeAbsolute constPath
@@ -59,5 +49,25 @@ tests =
5949 liftIO $ lib ^. agdaLibName @?= " no-deps"
6050#endif
6151 liftIO $ lib ^. agdaLibOrigin @?= FromFile (FS. LocalFilePath absAgdaLibPath)
62- liftIO $ lib ^. agdaLibIncludes @?= [FS. LocalFilePath absSrcPath]
52+ liftIO $ lib ^. agdaLibIncludes @?= [FS. LocalFilePath absSrcPath],
53+ testCase " Module without imports in lib without dependencies" $ do
54+ model <- TestData. getModel
55+
56+ LSP. runLspT undefined $ do
57+ env <- TestData. getServerEnv model
58+ runServerT env $ do
59+ runWithAgdaLib (LSP. filePathToUri natPath) $ do
60+ natSrc <- TestData. parseSourceFromPath natPath
61+ _ <- indexFile natSrc
62+ return () ,
63+ testCase " Module with imports in lib without lib dependencies" $ do
64+ model <- TestData. getModel
65+
66+ LSP. runLspT undefined $ do
67+ env <- TestData. getServerEnv model
68+ runServerT env $ do
69+ runWithAgdaLib (LSP. filePathToUri constPath) $ do
70+ constSrc <- TestData. parseSourceFromPath constPath
71+ _ <- indexFile constSrc
72+ return ()
6373 ]
0 commit comments