add test for hover over modules
This commit is contained in:
parent
24dc75eacc
commit
f14d91b9c4
@ -188,6 +188,7 @@
|
|||||||
;; unnecessary (do) in body position
|
;; unnecessary (do) in body position
|
||||||
;; duplicate keys in kv table
|
;; duplicate keys in kv table
|
||||||
;; (tset <sym> <str>) --> (set <sym>.<str>)
|
;; (tset <sym> <str>) --> (set <sym>.<str>)
|
||||||
|
;; (tset <sym> <any>) --> (set (. <sym> <any>))
|
||||||
;; {&as x} and [&as x] pattern with no other matches
|
;; {&as x} and [&as x] pattern with no other matches
|
||||||
;; Unused variables / fields (maybe difficult)
|
;; Unused variables / fields (maybe difficult)
|
||||||
;; discarding results to various calls, such as unpack, values, etc
|
;; discarding results to various calls, such as unpack, values, etc
|
||||||
|
|||||||
@ -6,9 +6,13 @@
|
|||||||
(fn check [file-contents ?response-string]
|
(fn check [file-contents ?response-string]
|
||||||
(let [{: self : uri : cursor} (create-client-with-files file-contents)
|
(let [{: self : uri : cursor} (create-client-with-files file-contents)
|
||||||
[message] (self:hover uri cursor)]
|
[message] (self:hover uri cursor)]
|
||||||
(if ?response-string
|
(if (= (type ?response-string) :string)
|
||||||
(faith.= ?response-string (?. message :result :contents :value)
|
(faith.= ?response-string (?. message :result :contents :value)
|
||||||
(.. "Invalid hover message\nfrom: " (view file-contents)))
|
(.. "Invalid hover message\nfrom: " (view file-contents)))
|
||||||
|
(= (type ?response-string) :function)
|
||||||
|
(faith.is (?response-string (?. message :result :contents :value))
|
||||||
|
(.. "Invalid hover message\nfrom: " (view file-contents)))
|
||||||
|
|
||||||
|
|
||||||
(faith.= null message.result))))
|
(faith.= null message.result))))
|
||||||
|
|
||||||
@ -58,6 +62,7 @@ and [`io.write`](https://lua.org/manual/5.4/manual.html#pdf-io.write).")
|
|||||||
```
|
```
|
||||||
This function is similar to [`pcall`](https://lua.org/manual/5.4/manual.html#pdf-pcall), except that it sets a
|
This function is similar to [`pcall`](https://lua.org/manual/5.4/manual.html#pdf-pcall), except that it sets a
|
||||||
new message handler `msgh`.")
|
new message handler `msgh`.")
|
||||||
|
(check "(table.inser|t [] :message" #($:find "```fnl\n(insert list ?pos value)\n```" 1 true))
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
(fn test-functions []
|
(fn test-functions []
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user