Skip to content

Commit f58a3f3

Browse files
committed
Fix test glob
1 parent 313816c commit f58a3f3

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

analysis/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function exp {
22
echo "$(dirname $1)/expected/$(basename $1).txt"
33
}
44

5-
for file in tests/src/*.res[i]; do
5+
for file in tests/src/*.{res,resi}; do
66
./rescript-editor-analysis.exe test $file &> $(exp $file)
77
done
88

analysis/tests/src/expected/Complete.res.txt

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ Complete tests/src/Complete.res 0:2
44
"kind": 12,
55
"tags": [],
66
"detail": "(t<'a>, 'a => 'b) => t<'b>",
7-
"documentation": {"kind": "markdown", "value": " [mapReverse xs f]\n\n Equivalent to [reverse (map xs f)]\n\n @example {[\n mapReverse [3;4;5] (fun x -> x * x) = [25;16;9];;\n ]}\n"}
7+
"documentation": {"kind": "markdown", "value": " [mapReverse xs f]\n\n Equivalent to [reverse (map xs f)]\n \n @example {[\n mapReverse [3;4;5] (fun x -> x * x) = [25;16;9];;\n ]}\n"}
88
}, {
99
"label": "makeBy",
1010
"kind": 12,
1111
"tags": [],
1212
"detail": "(int, int => 'a) => t<'a>",
13-
"documentation": {"kind": "markdown", "value": " [makeBy n f] \n\n - return a list of length [n] with element [i] initialized with [f i]\n - return the empty list if [n] is negative\n\n @example {[\n makeBy 5 (fun i -> i) = [0;1;2;3;4];;\n makeBy 5 (fun i -> i * i) = [0;1;4;9;16];;\n ]}\n"}
13+
"documentation": {"kind": "markdown", "value": " [makeBy n f] \n \n - return a list of length [n] with element [i] initialized with [f i]\n - return the empty list if [n] is negative\n\n @example {[\n makeBy 5 (fun i -> i) = [0;1;2;3;4];;\n makeBy 5 (fun i -> i * i) = [0;1;4;9;16];;\n ]}\n"}
1414
}, {
1515
"label": "make",
1616
"kind": 12,
1717
"tags": [],
1818
"detail": "(int, 'a) => t<'a>",
19-
"documentation": {"kind": "markdown", "value": " [make n v] \n\n - return a list of length [n] with each element filled with value [v] \n - return the empty list if [n] is negative\n\n @example {[\n make 3 1 = [1;1;1]\n ]}\n"}
19+
"documentation": {"kind": "markdown", "value": " [make n v] \n \n - return a list of length [n] with each element filled with value [v] \n - return the empty list if [n] is negative\n\n @example {[\n make 3 1 = [1;1;1]\n ]}\n"}
2020
}, {
2121
"label": "mapReverse2U",
2222
"kind": 12,
@@ -58,7 +58,7 @@ Complete tests/src/Complete.res 0:2
5858
"kind": 12,
5959
"tags": [],
6060
"detail": "(t<'a>, (int, 'a) => 'b) => t<'b>",
61-
"documentation": {"kind": "markdown", "value": " [mapWithIndex xs f] applies [f] to each element of [xs]. Function [f] takes two arguments:\n the index starting from 0 and the element from [xs].\n\n @example {[\n mapWithIndex [1;2;3] (fun i x -> i + x) =\n [0 + 1; 1 + 2; 2 + 3 ]\n ]}\n"}
61+
"documentation": {"kind": "markdown", "value": " [mapWithIndex xs f] applies [f] to each element of [xs]. Function [f] takes two arguments:\n the index starting from 0 and the element from [xs].\n\n @example {[\n mapWithIndex [1;2;3] (fun i x -> i + x) =\n [0 + 1; 1 + 2; 2 + 3 ]\n ]}\n"}
6262
}, {
6363
"label": "mapReverseU",
6464
"kind": 12,
@@ -391,13 +391,13 @@ Complete tests/src/Complete.res 27:2
391391
"kind": 12,
392392
"tags": [],
393393
"detail": "(option<'a>, option<'b>, (. 'a, 'b) => bool) => bool",
394-
"documentation": {"kind": "markdown", "value": "\n Uncurried version of [eq]\n"}
394+
"documentation": {"kind": "markdown", "value": "\n Uncurried version of [eq]\n"}
395395
}, {
396396
"label": "Belt.Option.eq",
397397
"kind": 12,
398398
"tags": [],
399399
"detail": "(option<'a>, option<'b>, ('a, 'b) => bool) => bool",
400-
"documentation": {"kind": "markdown", "value": "\n [eq optValue1 optvalue2 predicate]\n\n Evaluates two optional values for equality with respect to a predicate function.\n\n If both [optValue1] and [optValue2] are [None], returns [true].\n\n If one of the arguments is [Some value] and the other is [None], returns [false]\n\n If arguments are [Some value1] and [Some value2], returns the result of [predicate value1 value2];\n the [predicate] function must return a [bool]\n\n @example {[\n let clockEqual = (fun a b -> a mod 12 = b mod 12);;\n eq (Some 3) (Some 15) clockEqual = true;;\n eq (Some 3) None clockEqual = false;;\n eq None (Some 3) clockEqual = false;;\n eq None None clockEqual = true;;\n ]}\n"}
400+
"documentation": {"kind": "markdown", "value": "\n [eq optValue1 optvalue2 predicate]\n \n Evaluates two optional values for equality with respect to a predicate function.\n \n If both [optValue1] and [optValue2] are [None], returns [true].\n \n If one of the arguments is [Some value] and the other is [None], returns [false]\n \n If arguments are [Some value1] and [Some value2], returns the result of [predicate value1 value2];\n the [predicate] function must return a [bool]\n \n @example {[\n let clockEqual = (fun a b -> a mod 12 = b mod 12);;\n eq (Some 3) (Some 15) clockEqual = true;;\n eq (Some 3) None clockEqual = false;;\n eq None (Some 3) clockEqual = false;;\n eq None None clockEqual = true;;\n ]}\n"}
401401
}]
402402

403403
Complete tests/src/Complete.res 36:2
@@ -421,7 +421,7 @@ Complete tests/src/Complete.res 38:2
421421
"kind": 12,
422422
"tags": [],
423423
"detail": "(t<'a>, key) => 'a",
424-
"documentation": {"kind": "markdown", "value": " [unsafeGet dict key] return the value if the [key] exists, \n otherwise an {b undefined} value is returned. Must be used only \n when the existence of a key is certain. (i.e. when having called [keys]\n function previously. \n\n @example {[\n Array.iter (fun key -> Js.log (Js_dict.unsafeGet dic key)) (Js_dict.keys dict) \n ]} \n"}
424+
"documentation": {"kind": "markdown", "value": " [unsafeGet dict key] return the value if the [key] exists, \n otherwise an {b undefined} value is returned. Must be used only \n when the existence of a key is certain. (i.e. when having called [keys]\n function previously. \n\n@example {[\nArray.iter (fun key -> Js.log (Js_dict.unsafeGet dic key)) (Js_dict.keys dict) \n]} \n"}
425425
}, {
426426
"label": "unsafeDeleteKey",
427427
"kind": 12,
@@ -526,6 +526,16 @@ DocumentSymbol tests/src/Complete.res
526526
"kind": 2,
527527
"location": {"uri": "Complete.res", "range": {"start": {"line": 42, "character": 9}, "end": {"line": 46, "character": 3}}}
528528
},
529+
{
530+
"name": "makeProps",
531+
"kind": 12,
532+
"location": {"uri": "Complete.res", "range": {"start": {"line": 0, "character": -1}, "end": {"line": 0, "character": -1}}}
533+
},
534+
{
535+
"name": "make",
536+
"kind": 12,
537+
"location": {"uri": "Complete.res", "range": {"start": {"line": 0, "character": -1}, "end": {"line": 0, "character": -1}}}
538+
},
529539
{
530540
"name": "make",
531541
"kind": 12,

0 commit comments

Comments
 (0)