Skip to content

Commit 2dcfaa6

Browse files
committed
test: update positively impacted cases
1 parent 7cccf28 commit 2dcfaa6

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

tests/test-dirs/document/issue1513.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ FIXME: We should not rely on "fallbacking". This requires a compiler change.
2121
> -log-file - -log-section locate \
2222
> -filename main.ml <main.ml 2>&1 |
2323
> grep "Uid not found in the cmt table"
24-
Uid not found in the cmt table. Fallbacking to the node's location: File "naux.ml", line 2, characters 2-5
24+
Uid not found in the cmt table. Fallbacking to the node's location: File "naux.ml", line 2, characters 2-3
2525

2626
FIXME: expected "B Comment"
2727
$ $MERLIN single document -position 2:13 \

tests/test-dirs/locate/context-detection/cd-test.t/run.t

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Trying them all:
77
"file": "$TESTCASE_ROOT/test.ml",
88
"pos": {
99
"line": 1,
10-
"col": 0
10+
"col": 9
1111
}
1212
},
1313
"notifications": []
@@ -109,7 +109,7 @@ FIXME we failed to parse/reconstruct the ident, that's interesting
109109
"file": "$TESTCASE_ROOT/test.ml",
110110
"pos": {
111111
"line": 1,
112-
"col": 0
112+
"col": 9
113113
}
114114
},
115115
"notifications": []

tests/test-dirs/locate/issue802.t/run.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Test jumping from a normal constructor:
1515
"file": "$TESTCASE_ROOT/error.ml",
1616
"pos": {
1717
"line": 1,
18-
"col": 0
18+
"col": 9
1919
}
2020
},
2121
"notifications": []

tests/test-dirs/locate/locate-constrs.t

+11-10
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,47 @@
33
**/
44

55
$ cat >constr.ml <<EOF
6-
> type t = A of int | B
7-
> let foo : t = A 42
6+
> module C = struct type t = A of int | B end
7+
> let foo : C.t = C.A 42
88
> EOF
99

10-
$ $MERLIN single locate -look-for mli -position 2:14 \
10+
We expect 1:27
11+
$ $MERLIN single locate -look-for mli -position 2:18 \
1112
> -filename ./constr.ml < ./constr.ml | jq '.value'
1213
{
1314
"file": "$TESTCASE_ROOT/constr.ml",
1415
"pos": {
1516
"line": 1,
16-
"col": 9
17+
"col": 27
1718
}
1819
}
1920

2021
FIXME: this is not a very satisfying answer.
21-
We could expect 1:9
22-
$ $MERLIN single locate -look-for ml -position 2:14 \
22+
We expect 1:18
23+
$ $MERLIN single locate -look-for ml -position 2:12 \
2324
> -filename ./constr.ml < ./constr.ml | jq '.value'
2425
{
2526
"file": "$TESTCASE_ROOT/constr.ml",
2627
"pos": {
2728
"line": 1,
28-
"col": 0
29+
"col": 18
2930
}
3031
}
3132

3233
With the declaration in another compilation unit:
3334
$ cat >other_module.ml <<EOF
34-
> let foo = Constr.B
35+
> let foo = Constr.C.B
3536
> EOF
3637

3738
$ $OCAMLC -c -bin-annot constr.ml
3839

39-
$ $MERLIN single locate -look-for mli -position 1:17 \
40+
$ $MERLIN single locate -look-for mli -position 1:19 \
4041
> -filename ./other_module.ml < ./other_module.ml | jq '.value'
4142
{
4243
"file": "$TESTCASE_ROOT/constr.ml",
4344
"pos": {
4445
"line": 1,
45-
"col": 18
46+
"col": 36
4647
}
4748
}
4849

0 commit comments

Comments
 (0)