Skip to content

Commit

Permalink
tests: Promote valid changes
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Nov 15, 2023
1 parent 4fb6c4d commit 83c781f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
10 changes: 2 additions & 8 deletions tests/test-dirs/locate/context-detection/cd-test.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,12 @@ Trying them all:
"notifications": []
}

FIXME this should say "Already at definition point" (we're defining the label):
This should say "Already at definition point" (we're defining the label):

$ $MERLIN single locate -look-for ml -position 13:12 -filename ./test.ml < ./test.ml
{
"class": "return",
"value": {
"file": "$TESTCASE_ROOT/test.ml",
"pos": {
"line": 5,
"col": 4
}
},
"value": "Already at definition point",
"notifications": []
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test-dirs/locate/functors/f-all_local.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Check that we can jump from inside the functor to the (sig of the) parameter:
"file": "$TESTCASE_ROOT/all_local.ml",
"pos": {
"line": 2,
"col": 2
"col": 7
}
},
"notifications": []
Expand Down
2 changes: 1 addition & 1 deletion tests/test-dirs/locate/issue1424.t
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ FIXME: it should jump to the ml file
"file": "$TESTCASE_ROOT/test2.mli",
"pos": {
"line": 1,
"col": 0
"col": 4
}
}
10 changes: 7 additions & 3 deletions tests/test-dirs/locate/non-local/ignore-kept-locs.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ available:
}

$ grep -A1 from_uid log | grep -v from_uid | sed '/^--$/d'
Loading the shapes for unit "A"
Loading the cmt file for unit "A"
Shapes successfully loaded, looking for A.0
Found location: File "a.ml", line 1, characters 4-9

Expand All @@ -41,7 +41,7 @@ available:
}

$ grep -A1 from_uid log | grep -v from_uid | sed '/^--$/d'
Loading the shapes for unit "A"
Loading the cmt file for unit "A"
Shapes successfully loaded, looking for A.0
Found location: File "a.ml", line 1, characters 4-9

Expand All @@ -66,6 +66,10 @@ In the absence of cmt though, fallbacking to the cmi loc makes sense:
}

$ grep -A1 from_uid log | grep -v from_uid
No UID found, fallbacking to lookup location.
No definition uid, fallbacking to the declaration uid: A.0
Loading the cmt file for unit "A"
--
Failed to load the shapes
Uid not found in the cmt table. Fallbacking to the node's location: File "a.ml", line 1, characters 4-9

$ rm log
3 changes: 1 addition & 2 deletions tests/test-dirs/locate/sig-substs.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ when both are present in the buffer (the struct will always be preferred).
"notifications": []
}

TODO SHAPES: it could be more precise by answering 8:21
$ $MERLIN single locate -look-for ml -position 10:13 -filename ./basic.ml < ./basic.ml
{
"class": "return",
"value": {
"file": "$TESTCASE_ROOT/basic.ml",
"pos": {
"line": 8,
"col": 9
"col": 25
}
},
"notifications": []
Expand Down
6 changes: 5 additions & 1 deletion tests/test-dirs/locate/without-implem.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

$ dune build ./main.exe 2> /dev/null

Definition of t
$ $MERLIN single locate -look-for ml -position 1:16 \
> -filename main.ml <main.ml
{
Expand All @@ -26,12 +27,13 @@
"file": "$TESTCASE_ROOT/noimpl.mli",
"pos": {
"line": 1,
"col": 0
"col": 5
}
},
"notifications": []
}

Declaration of t
$ $MERLIN single locate -look-for mli -position 1:16 \
> -filename main.ml <main.ml
{
Expand All @@ -46,6 +48,7 @@
"notifications": []
}

Definition of module Noimpl
$ $MERLIN single locate -look-for ml -position 1:13 \
> -filename main.ml <main.ml
{
Expand All @@ -60,6 +63,7 @@
"notifications": []
}

Declaration of module Noimpl
$ $MERLIN single locate -look-for mli -position 1:13 \
> -filename main.ml <main.ml
{
Expand Down
2 changes: 1 addition & 1 deletion tests/test-dirs/occurrences/issue827.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Reproduction case:
{
"start": {
"line": 2,
"col": 18
"col": 16
},
"end": {
"line": 2,
Expand Down

0 comments on commit 83c781f

Please sign in to comment.