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

Commit dedd3ce

Browse files
committed
Add test for "Add pipe autocomplete for builtin list, array, string, option types".
1 parent d008075 commit dedd3ce

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

test/src/Complete.res

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,10 @@ module Lib = {
2020

2121
//^com let x = foo(~
2222

23-
//^com [1,2,3]->m
23+
//^com [1,2,3]->m
24+
25+
//^com "abc"->toU
26+
27+
let op = Some(3)
28+
29+
//^com op->e

test/src/expected/Complete.res.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,3 +376,27 @@ Complete src/Complete.res 21:2
376376
"documentation": {"kind": "markdown", "value": "\njs_array2.ml:126"}
377377
}]
378378

379+
Complete src/Complete.res 23:2
380+
[{
381+
"label": "Js.String2.toUpperCase",
382+
"kind": 12,
383+
"tags": [],
384+
"detail": "t => t",
385+
"documentation": {"kind": "markdown", "value": "`toUpperCase str` converts `str` to upper case using the locale-insensitive case mappings in the Unicode Character Database. Notice that the conversion can expand the number of letters in the result; for example the German `\195\159` capitalizes to two `S`es in a row.\n\n```ml\ntoUpperCase \"abc\" = \"ABC\";;\ntoUpperCase {js|Stra\195\159e|js} = {js|STRASSE|js};;\ntoLowerCase {js|\207\128\207\130|js} = {js|\206\160\206\163|js};;\n```\n\n\n\njs_string2.ml:601"}
386+
}]
387+
388+
Complete src/Complete.res 27:2
389+
[{
390+
"label": "Belt.Option.eqU",
391+
"kind": 12,
392+
"tags": [],
393+
"detail": "(option<'a>, option<'b>, (. 'a, 'b) => bool) => bool",
394+
"documentation": {"kind": "markdown", "value": "Uncurried version of `eq`\n\n\n\n\nbelt_Option.mli:154"}
395+
}, {
396+
"label": "Belt.Option.eq",
397+
"kind": 12,
398+
"tags": [],
399+
"detail": "(option<'a>, option<'b>, ('a, 'b) => bool) => bool",
400+
"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"}
401+
}]
402+

0 commit comments

Comments
 (0)