Skip to content

Commit 98aa5e9

Browse files
committed
Promote ordering changes in tests
1 parent b922789 commit 98aa5e9

File tree

8 files changed

+96
-96
lines changed

8 files changed

+96
-96
lines changed

tests/test-dirs/occurrences/project-wide/for-renaming/r-modules-and-types.t

+12-12
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@
6565
},
6666
"stale": false
6767
},
68+
{
69+
"file": "$TESTCASE_ROOT/main.ml",
70+
"start": {
71+
"line": 5,
72+
"col": 25
73+
},
74+
"end": {
75+
"line": 5,
76+
"col": 26
77+
},
78+
"stale": false
79+
},
6880
{
6981
"file": "$TESTCASE_ROOT/lib.ml",
7082
"start": {
@@ -112,18 +124,6 @@
112124
"col": 7
113125
},
114126
"stale": false
115-
},
116-
{
117-
"file": "$TESTCASE_ROOT/main.ml",
118-
"start": {
119-
"line": 5,
120-
"col": 25
121-
},
122-
"end": {
123-
"line": 5,
124-
"col": 26
125-
},
126-
"stale": false
127127
}
128128
],
129129
"notifications": []

tests/test-dirs/occurrences/project-wide/for-renaming/r-with-functors.t/run.t

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ We expect 2 occurrences in func.ml, 1 in func.mli and 2 in main.ml
1212
"line": 1,
1313
"col": 22
1414
}
15+
"$TESTCASE_ROOT/main.ml"
16+
{
17+
"line": 4,
18+
"col": 16
19+
}
1520
"$TESTCASE_ROOT/func.ml"
1621
{
1722
"line": 1,
@@ -27,8 +32,3 @@ We expect 2 occurrences in func.ml, 1 in func.mli and 2 in main.ml
2732
"line": 1,
2833
"col": 24
2934
}
30-
"$TESTCASE_ROOT/main.ml"
31-
{
32-
"line": 4,
33-
"col": 16
34-
}

tests/test-dirs/occurrences/project-wide/mli-vs-ml.t

+20-20
Original file line numberDiff line numberDiff line change
@@ -48,37 +48,37 @@ the interface and the implementation.
4848
"stale": false
4949
},
5050
{
51-
"file": "$TESTCASE_ROOT/main.ml",
51+
"file": "$TESTCASE_ROOT/main.mli",
5252
"start": {
5353
"line": 2,
54-
"col": 5
54+
"col": 8
5555
},
5656
"end": {
5757
"line": 2,
58-
"col": 6
58+
"col": 9
5959
},
6060
"stale": false
6161
},
6262
{
6363
"file": "$TESTCASE_ROOT/main.ml",
6464
"start": {
65-
"line": 3,
66-
"col": 8
65+
"line": 2,
66+
"col": 5
6767
},
6868
"end": {
69-
"line": 3,
70-
"col": 9
69+
"line": 2,
70+
"col": 6
7171
},
7272
"stale": false
7373
},
7474
{
75-
"file": "$TESTCASE_ROOT/main.mli",
75+
"file": "$TESTCASE_ROOT/main.ml",
7676
"start": {
77-
"line": 2,
77+
"line": 3,
7878
"col": 8
7979
},
8080
"end": {
81-
"line": 2,
81+
"line": 3,
8282
"col": 9
8383
},
8484
"stale": false
@@ -107,37 +107,37 @@ Same when the cursor is at the origin:
107107
"stale": false
108108
},
109109
{
110-
"file": "$TESTCASE_ROOT/main.ml",
110+
"file": "$TESTCASE_ROOT/main.mli",
111111
"start": {
112112
"line": 2,
113-
"col": 5
113+
"col": 8
114114
},
115115
"end": {
116116
"line": 2,
117-
"col": 6
117+
"col": 9
118118
},
119119
"stale": false
120120
},
121121
{
122122
"file": "$TESTCASE_ROOT/main.ml",
123123
"start": {
124-
"line": 3,
125-
"col": 8
124+
"line": 2,
125+
"col": 5
126126
},
127127
"end": {
128-
"line": 3,
129-
"col": 9
128+
"line": 2,
129+
"col": 6
130130
},
131131
"stale": false
132132
},
133133
{
134-
"file": "$TESTCASE_ROOT/main.mli",
134+
"file": "$TESTCASE_ROOT/main.ml",
135135
"start": {
136-
"line": 2,
136+
"line": 3,
137137
"col": 8
138138
},
139139
"end": {
140-
"line": 2,
140+
"line": 3,
141141
"col": 9
142142
},
143143
"stale": false

tests/test-dirs/occurrences/project-wide/prefix.t/run.t

+24-24
Original file line numberDiff line numberDiff line change
@@ -99,38 +99,38 @@ Merlin successfully finds occurrences outside file when UNIT_NAME directive is u
9999
"stale": false
100100
},
101101
{
102-
"file": "$TESTCASE_ROOT/a.ml",
102+
"file": "$TESTCASE_ROOT/b.ml",
103103
"start": {
104-
"line": 1,
105-
"col": 12
104+
"line": 2,
105+
"col": 8
106106
},
107107
"end": {
108-
"line": 1,
109-
"col": 13
108+
"line": 2,
109+
"col": 9
110110
},
111111
"stale": false
112112
},
113113
{
114114
"file": "$TESTCASE_ROOT/a.ml",
115115
"start": {
116-
"line": 2,
117-
"col": 18
116+
"line": 1,
117+
"col": 12
118118
},
119119
"end": {
120-
"line": 2,
121-
"col": 19
120+
"line": 1,
121+
"col": 13
122122
},
123123
"stale": false
124124
},
125125
{
126-
"file": "$TESTCASE_ROOT/b.ml",
126+
"file": "$TESTCASE_ROOT/a.ml",
127127
"start": {
128128
"line": 2,
129-
"col": 8
129+
"col": 18
130130
},
131131
"end": {
132132
"line": 2,
133-
"col": 9
133+
"col": 19
134134
},
135135
"stale": false
136136
}
@@ -162,38 +162,38 @@ Merlin successfully finds occurrences outside file when WRAPPING_PREFIX directiv
162162
"stale": false
163163
},
164164
{
165-
"file": "$TESTCASE_ROOT/a.ml",
165+
"file": "$TESTCASE_ROOT/b.ml",
166166
"start": {
167-
"line": 1,
168-
"col": 12
167+
"line": 2,
168+
"col": 8
169169
},
170170
"end": {
171-
"line": 1,
172-
"col": 13
171+
"line": 2,
172+
"col": 9
173173
},
174174
"stale": false
175175
},
176176
{
177177
"file": "$TESTCASE_ROOT/a.ml",
178178
"start": {
179-
"line": 2,
180-
"col": 18
179+
"line": 1,
180+
"col": 12
181181
},
182182
"end": {
183-
"line": 2,
184-
"col": 19
183+
"line": 1,
184+
"col": 13
185185
},
186186
"stale": false
187187
},
188188
{
189-
"file": "$TESTCASE_ROOT/b.ml",
189+
"file": "$TESTCASE_ROOT/a.ml",
190190
"start": {
191191
"line": 2,
192-
"col": 8
192+
"col": 18
193193
},
194194
"end": {
195195
"line": 2,
196-
"col": 9
196+
"col": 19
197197
},
198198
"stale": false
199199
}

tests/test-dirs/occurrences/project-wide/pwo-basic.t

+12-12
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,38 @@
2929
"class": "return",
3030
"value": [
3131
{
32-
"file": "$TESTCASE_ROOT/lib.ml",
32+
"file": "$TESTCASE_ROOT/main.ml",
3333
"start": {
3434
"line": 1,
35-
"col": 4
35+
"col": 26
3636
},
3737
"end": {
3838
"line": 1,
39-
"col": 7
39+
"col": 29
4040
},
4141
"stale": false
4242
},
4343
{
4444
"file": "$TESTCASE_ROOT/lib.ml",
4545
"start": {
46-
"line": 2,
47-
"col": 22
46+
"line": 1,
47+
"col": 4
4848
},
4949
"end": {
50-
"line": 2,
51-
"col": 25
50+
"line": 1,
51+
"col": 7
5252
},
5353
"stale": false
5454
},
5555
{
56-
"file": "$TESTCASE_ROOT/main.ml",
56+
"file": "$TESTCASE_ROOT/lib.ml",
5757
"start": {
58-
"line": 1,
59-
"col": 26
58+
"line": 2,
59+
"col": 22
6060
},
6161
"end": {
62-
"line": 1,
63-
"col": 29
62+
"line": 2,
63+
"col": 25
6464
},
6565
"stale": false
6666
}

tests/test-dirs/occurrences/project-wide/pwo-canonicalize.t

+10-10
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,26 @@
3131
"stale": false
3232
},
3333
{
34-
"file": "$TESTCASE_ROOT/lib.ml",
34+
"file": "$TESTCASE_ROOT/main.ml",
3535
"start": {
36-
"line": 2,
37-
"col": 22
36+
"line": 1,
37+
"col": 26
3838
},
3939
"end": {
40-
"line": 2,
41-
"col": 25
40+
"line": 1,
41+
"col": 29
4242
},
4343
"stale": false
4444
},
4545
{
46-
"file": "$TESTCASE_ROOT/main.ml",
46+
"file": "$TESTCASE_ROOT/lib.ml",
4747
"start": {
48-
"line": 1,
49-
"col": 26
48+
"line": 2,
49+
"col": 22
5050
},
5151
"end": {
52-
"line": 1,
53-
"col": 29
52+
"line": 2,
53+
"col": 25
5454
},
5555
"stale": false
5656
}

tests/test-dirs/occurrences/project-wide/pwo-ml-gen.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ We should not index generated modules (lib.ml-gen)
5757

5858
$ $MERLIN single occurrences -scope project -identifier-at 3:23 \
5959
> -filename main.ml <main.ml | jq '.value[].file'
60+
"$TESTCASE_ROOT/main.ml"
6061
"$TESTCASE_ROOT/lib/aux.ml"
6162
"$TESTCASE_ROOT/lib/aux.ml"
62-
"$TESTCASE_ROOT/main.ml"

tests/test-dirs/occurrences/project-wide/stale-index.t

+12-12
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@ Foo was defined on line 2 when the index was built, but is now defined on line 1
2020
> -index-file project.ocaml-index \
2121
> -filename main.ml < main.ml | jq .value
2222
[
23-
{
24-
"file": "$TESTCASE_ROOT/lib.ml",
25-
"start": {
26-
"line": 2,
27-
"col": 4
28-
},
29-
"end": {
30-
"line": 2,
31-
"col": 7
32-
},
33-
"stale": true
34-
},
3523
{
3624
"file": "$TESTCASE_ROOT/main.ml",
3725
"start": {
@@ -43,5 +31,17 @@ Foo was defined on line 2 when the index was built, but is now defined on line 1
4331
"col": 29
4432
},
4533
"stale": false
34+
},
35+
{
36+
"file": "$TESTCASE_ROOT/lib.ml",
37+
"start": {
38+
"line": 2,
39+
"col": 4
40+
},
41+
"end": {
42+
"line": 2,
43+
"col": 7
44+
},
45+
"stale": true
4646
}
4747
]

0 commit comments

Comments
 (0)