Skip to content

Commit 433a8ad

Browse files
committed
Add a signature help test: imported function with argument doc
1 parent f1d19ba commit 433a8ad

File tree

1 file changed

+10
-0
lines changed
  • plugins/hls-signature-help-plugin/test

1 file changed

+10
-0
lines changed

plugins/hls-signature-help-plugin/test/Main.hs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,16 @@ main =
317317
|]
318318
[ Nothing,
319319
Just $ SignatureHelp [SignatureInformation "f :: Bool -> Int -> Bool" (Just $ InR $ MarkupContent MarkupKind_Markdown "\n\nDoc for function `f` .\n\n") (Just [ParameterInformation (InR (5,9)) (Just $ InR $ MarkupContent MarkupKind_Markdown "\n\nThe first `Bool` argument\n\n"), ParameterInformation (InR (13,16)) (Just $ InR $ MarkupContent MarkupKind_Markdown "\n\nThe second `Int` argument\n\n")]) (Just (InL 0))] (Just 0) (Just (InL 0))
320+
],
321+
mkTest
322+
"imported function with argument documentation"
323+
[trimming|
324+
import Language.Haskell.TH.Lib (mkBytes)
325+
x = mkBytes _
326+
^ ^
327+
|]
328+
[ Nothing,
329+
Just $ SignatureHelp [SignatureInformation "mkBytes :: ForeignPtr Word8 -> Word -> Word -> Bytes" (Just $ InR $ MarkupContent MarkupKind_Markdown "\n\nCreate a Bytes datatype representing raw bytes to be embedded into the\n program/library binary.\n\n\\[Documentation\\]\\(file://.*\\)\n\n\\[Source\\]\\(file://.*\\)\n\n") (Just [ParameterInformation (InR (11,27)) (Just $ InR $ MarkupContent MarkupKind_Markdown "\n\nPointer to the data\n\n"), ParameterInformation (InR (31,35)) (Just $ InR $ MarkupContent MarkupKind_Markdown "\n\nOffset from the pointer\n\n"), ParameterInformation (InR (39,43)) (Just $ InR $ MarkupContent MarkupKind_Markdown "\n\nNumber of bytes\n\n")]) (Just (InL 0))] (Just 0) (Just (InL 0))
320330
]
321331
]
322332

0 commit comments

Comments
 (0)