Skip to content

Commit cc72986

Browse files
committed
Move test infra inside tests/
1 parent 84c06b6 commit cc72986

33 files changed

+272
-261
lines changed

analysis/Makefile

+4-8
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@ build-native:
88
dce: build-native
99
opam exec reanalyze.exe -- -dce-cmt _build -suppress vendor
1010

11-
tests/node_modules/.bin/rescript:
12-
@cd tests && npm install
13-
14-
test-analysis-binary: build-native tests/node_modules/.bin/rescript
15-
@cd tests && node_modules/.bin/rescript
16-
./test.sh
11+
test-analysis-binary: build-native
12+
make -C tests test
1713

1814
test-reanalyze: build-native
1915
make -C reanalyze test
2016

2117
test: test-analysis-binary test-reanalyze
2218

23-
clean: tests/node_modules/.bin/rescript
19+
clean:
2420
rm -f rescript-editor-analysis.exe
25-
@cd tests && node_modules/.bin/rescript clean
21+
make -C tests test
2622
dune clean
2723
make -C reanalyze clean
2824

analysis/tests/Makefile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
SHELL = /bin/bash
2+
3+
node_modules/.bin/rescript:
4+
npm install
5+
6+
test: node_modules/.bin/rescript
7+
node_modules/.bin/rescript
8+
./test.sh
9+
10+
clean: node_modules/.bin/rescript
11+
node_modules/.bin/rescript clean -with-deps
12+
13+
.DEFAULT_GOAL := test
14+
15+
.PHONY: clean test
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Hover tests/src/Auto.res 2:13
1+
Hover src/Auto.res 2:13
22
{"contents": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n\n `map xs f`\n\n **return** the list obtained by applying `f` to each element of `xs`\n\n ```\n map [1;2] (fun x-> x + 1) = [3;4]\n ```\n"}
33

analysis/tests/src/expected/CompletePrioritize1.res.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Complete tests/src/CompletePrioritize1.res 5:6
1+
Complete src/CompletePrioritize1.res 5:6
22
posCursor:[5:6] posNoWhite:[5:5] Found expr:[5:3->0:-1]
33
Completable: Cpath Value[a]->
44
[{

analysis/tests/src/expected/CompletePrioritize2.res.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Complete tests/src/CompletePrioritize2.res 9:7
1+
Complete src/CompletePrioritize2.res 9:7
22
posCursor:[9:7] posNoWhite:[9:6] Found expr:[9:3->0:-1]
33
Completable: Cpath Value[ax]->
44
[{
@@ -9,7 +9,7 @@ Completable: Cpath Value[ax]->
99
"documentation": null
1010
}]
1111

12-
Complete tests/src/CompletePrioritize2.res 12:5
12+
Complete src/CompletePrioritize2.res 12:5
1313
posCursor:[12:5] posNoWhite:[12:4] Found expr:[12:3->12:5]
1414
Pexp_ident ax:[12:3->12:5]
1515
Completable: Cpath Value[ax]

0 commit comments

Comments
 (0)