Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 067cb02

Browse files
committed
Add simple test for pipe autocomplete in user-defined module.
1 parent dedd3ce commit 067cb02

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

test/src/Complete.res

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,14 @@ module Lib = {
2626

2727
let op = Some(3)
2828

29-
//^com op->e
29+
//^com op->e
30+
31+
module ForAuto = {
32+
type t = int
33+
let abc = (x:t, _y:int) => x
34+
let abd = (x:t, _y:int) => x
35+
}
36+
37+
let fa:ForAuto.t = 34
38+
//^com fa->
39+

test/src/expected/Complete.res.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,3 +400,18 @@ Complete src/Complete.res 27:2
400400
"documentation": {"kind": "markdown", "value": "`eq optValue1 optvalue2 predicate`\n\nEvaluates two optional values for equality with respect to a predicate function.\n\nIf both `optValue1` and `optValue2` are `None`, returns `true`.\n\nIf one of the arguments is `Some value` and the other is `None`, returns `false`\n\nIf arguments are `Some value1` and `Some value2`, returns the result of `predicate value1 value2`; the `predicate` function must return a `bool`\n\n```ml\nlet clockEqual = (fun a b -> a mod 12 = b mod 12);;\neq (Some 3) (Some 15) clockEqual = true;;\neq (Some 3) None clockEqual = false;;\neq None (Some 3) clockEqual = false;;\neq None None clockEqual = true;;\n```\n\n\n\nbelt_Option.mli:159"}
401401
}]
402402

403+
Complete src/Complete.res 36:2
404+
[{
405+
"label": "ForAuto.abc",
406+
"kind": 12,
407+
"tags": [],
408+
"detail": "(t, int) => t",
409+
"documentation": {"kind": "markdown", "value": "\nComplete.res:33"}
410+
}, {
411+
"label": "ForAuto.abd",
412+
"kind": 12,
413+
"tags": [],
414+
"detail": "(t, int) => t",
415+
"documentation": {"kind": "markdown", "value": "\nComplete.res:34"}
416+
}]
417+

0 commit comments

Comments
 (0)