Skip to content

Commit

Permalink
tests: refactor and complete test for #949
Browse files Browse the repository at this point in the history
 about locating infix operators
  • Loading branch information
voodoos committed May 24, 2023
1 parent 740d244 commit bfaa163
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
27 changes: 27 additions & 0 deletions tests/test-dirs/locate/issue949.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
This test is for testing the behavior of identifiers with a . in them:

$ cat >main.ml <<EOF
> module A = struct let (+.) a b = a +. b end
> let f x = A.(x +. 1.)
> let g x = A.(+.) x 1.
> EOF

$ $MERLIN single locate -look-for ml -position 2:16 \
> -filename ./main.ml < ./main.ml | jq '.value'
{
"file": "$TESTCASE_ROOT/main.ml",
"pos": {
"line": 1,
"col": 22
}
}

$ $MERLIN single locate -look-for ml -position 3:14 \
> -filename ./main.ml < ./main.ml | jq '.value'
{
"file": "$TESTCASE_ROOT/main.ml",
"pos": {
"line": 1,
"col": 22
}
}
2 changes: 0 additions & 2 deletions tests/test-dirs/locate/issue949.t/issue949.ml

This file was deleted.

15 changes: 0 additions & 15 deletions tests/test-dirs/locate/issue949.t/run.t

This file was deleted.

0 comments on commit bfaa163

Please sign in to comment.