Skip to content

Move test infra inside tests/ #443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions analysis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@ build-native:
dce: build-native
opam exec reanalyze.exe -- -dce-cmt _build -suppress vendor

tests/node_modules/.bin/rescript:
@cd tests && npm install

test-analysis-binary: build-native tests/node_modules/.bin/rescript
@cd tests && node_modules/.bin/rescript
./test.sh
test-analysis-binary: build-native
make -C tests test

test-reanalyze: build-native
make -C reanalyze test

test: test-analysis-binary test-reanalyze

clean: tests/node_modules/.bin/rescript
clean:
rm -f rescript-editor-analysis.exe
@cd tests && node_modules/.bin/rescript clean
make -C tests test
dune clean
make -C reanalyze clean

Expand Down
15 changes: 15 additions & 0 deletions analysis/tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
SHELL = /bin/bash

node_modules/.bin/rescript:
npm install

test: node_modules/.bin/rescript
node_modules/.bin/rescript
./test.sh

clean: node_modules/.bin/rescript
node_modules/.bin/rescript clean -with-deps

.DEFAULT_GOAL := test

.PHONY: clean test
2 changes: 1 addition & 1 deletion analysis/tests/src/expected/Auto.res.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Hover tests/src/Auto.res 2:13
Hover src/Auto.res 2:13
{"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"}

2 changes: 1 addition & 1 deletion analysis/tests/src/expected/CompletePrioritize1.res.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Complete tests/src/CompletePrioritize1.res 5:6
Complete src/CompletePrioritize1.res 5:6
posCursor:[5:6] posNoWhite:[5:5] Found expr:[5:3->0:-1]
Completable: Cpath Value[a]->
[{
Expand Down
4 changes: 2 additions & 2 deletions analysis/tests/src/expected/CompletePrioritize2.res.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Complete tests/src/CompletePrioritize2.res 9:7
Complete src/CompletePrioritize2.res 9:7
posCursor:[9:7] posNoWhite:[9:6] Found expr:[9:3->0:-1]
Completable: Cpath Value[ax]->
[{
Expand All @@ -9,7 +9,7 @@ Completable: Cpath Value[ax]->
"documentation": null
}]

Complete tests/src/CompletePrioritize2.res 12:5
Complete src/CompletePrioritize2.res 12:5
posCursor:[12:5] posNoWhite:[12:4] Found expr:[12:3->12:5]
Pexp_ident ax:[12:3->12:5]
Completable: Cpath Value[ax]
Expand Down
Loading