Skip to content

Commit 5120417

Browse files
committed
hls-notes-plugin: Fix tests after haskell#3846, add CI job
1 parent f959f67 commit 5120417

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ jobs:
240240
name: Test hls-overloaded-record-dot-plugin test suite
241241
run: cabal test hls-overloaded-record-dot-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-overloaded-record-dot-plugin --test-options="$TEST_OPTS"
242242

243-
243+
- if: matrix.test
244+
name: Test hls-notes-plugin test suite
245+
run: cabal test hls-notes-plugin --test-options="$TEST_OPTS" || cabal test hls-notes-plugin --test-options="$TEST_OPTS"
244246

245247
test_post_job:
246248
if: always()

plugins/hls-notes-plugin/test/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ gotoNoteTests = testGroup "Goto Note Definition"
2323
defs <- getDefinitions doc (Position 3 41)
2424
liftIO $ do
2525
fp <- canonicalizePath "NoteDef.hs"
26-
defs @?= InL (Definition (InL (Location (filePathToUri fp) (Range (Position 5 9) (Position 5 9)))))
26+
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 5 9) (Position 5 9))]))
2727
, testCase "no_note" $ runSessionWithServer def plugin testDataDir $ do
2828
doc <- openDoc "NoteDef.hs" "haskell"
2929
defs <- getDefinitions doc (Position 1 0)
@@ -36,7 +36,7 @@ gotoNoteTests = testGroup "Goto Note Definition"
3636
defs <- getDefinitions doc (Position 5 20)
3737
liftIO $ do
3838
fp <- canonicalizePath "NoteDef.hs"
39-
defs @?= InL (Definition (InL (Location (filePathToUri fp) (Range (Position 9 6) (Position 9 6)))))
39+
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 9 6) (Position 9 6))]))
4040
]
4141

4242
testDataDir :: FilePath

0 commit comments

Comments
 (0)