Skip to content

Commit bfaa163

Browse files
committed
tests: refactor and complete test for #949
about locating infix operators
1 parent 740d244 commit bfaa163

File tree

3 files changed

+27
-17
lines changed

3 files changed

+27
-17
lines changed

tests/test-dirs/locate/issue949.t

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
This test is for testing the behavior of identifiers with a . in them:
2+
3+
$ cat >main.ml <<EOF
4+
> module A = struct let (+.) a b = a +. b end
5+
> let f x = A.(x +. 1.)
6+
> let g x = A.(+.) x 1.
7+
> EOF
8+
9+
$ $MERLIN single locate -look-for ml -position 2:16 \
10+
> -filename ./main.ml < ./main.ml | jq '.value'
11+
{
12+
"file": "$TESTCASE_ROOT/main.ml",
13+
"pos": {
14+
"line": 1,
15+
"col": 22
16+
}
17+
}
18+
19+
$ $MERLIN single locate -look-for ml -position 3:14 \
20+
> -filename ./main.ml < ./main.ml | jq '.value'
21+
{
22+
"file": "$TESTCASE_ROOT/main.ml",
23+
"pos": {
24+
"line": 1,
25+
"col": 22
26+
}
27+
}

tests/test-dirs/locate/issue949.t/issue949.ml

Lines changed: 0 additions & 2 deletions
This file was deleted.

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

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)