Skip to content

Commit

Permalink
hls-notes-plugin: Fix tests after haskell#3846, add CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanbruegge committed Dec 1, 2023
1 parent f959f67 commit 5120417
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ jobs:
name: Test hls-overloaded-record-dot-plugin test suite
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"


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

test_post_job:
if: always()
Expand Down
4 changes: 2 additions & 2 deletions plugins/hls-notes-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gotoNoteTests = testGroup "Goto Note Definition"
defs <- getDefinitions doc (Position 3 41)
liftIO $ do
fp <- canonicalizePath "NoteDef.hs"
defs @?= InL (Definition (InL (Location (filePathToUri fp) (Range (Position 5 9) (Position 5 9)))))
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 5 9) (Position 5 9))]))
, testCase "no_note" $ runSessionWithServer def plugin testDataDir $ do
doc <- openDoc "NoteDef.hs" "haskell"
defs <- getDefinitions doc (Position 1 0)
Expand All @@ -36,7 +36,7 @@ gotoNoteTests = testGroup "Goto Note Definition"
defs <- getDefinitions doc (Position 5 20)
liftIO $ do
fp <- canonicalizePath "NoteDef.hs"
defs @?= InL (Definition (InL (Location (filePathToUri fp) (Range (Position 9 6) (Position 9 6)))))
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 9 6) (Position 9 6))]))
]

testDataDir :: FilePath
Expand Down

0 comments on commit 5120417

Please sign in to comment.