Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f1a66e5

Browse files
Add flymake integration-test
1 parent a549ed1 commit f1a66e5

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

test/Test1/Test1.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9+
<Compile Include="Error.fs" />
910
<Compile Include="FileTwo.fs" />
1011
<Compile Include="Program.fs" />
1112
</ItemGroup>

test/integration-tests.el

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@
3232
(it "Can be installed"
3333
(eglot-fsharp--maybe-install)
3434
(expect (file-exists-p (eglot-fsharp--path-to-server)) :to-be t))
35+
(it "shows flymake errors"
36+
(with-current-buffer (eglot--find-file-noselect "test/Test1/Error.fs")
37+
(eglot--tests-connect 10)
38+
(search-forward "nonexisting")
39+
(flymake-mode t)
40+
(flymake-start)
41+
(goto-char (point-min))
42+
(eglot--sniffing (:server-notifications s-notifs)
43+
(eglot--wait-for (s-notifs 10)
44+
(&key _id method &allow-other-keys)
45+
(string= method "textDocument/publishDiagnostics")))
46+
(flymake-goto-next-error 1 '() t)
47+
(expect (face-at-point) :to-be 'flymake-error )))
3548
(it "is enabled on F# Files"
3649
(with-current-buffer (eglot--find-file-noselect "test/Test1/FileTwo.fs")
3750
(eglot--tests-connect 30)

0 commit comments

Comments
 (0)