Don't use 'git' to do comparison for tests
This commit is contained in:
parent
617c1e8eec
commit
7df8c0803f
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@
|
||||
/*.exe
|
||||
/*.deb
|
||||
/krk-*
|
||||
/test/*.actual
|
||||
# I typically clone these subprojects in the root as well.
|
||||
/wasm/
|
||||
/jupyter/
|
||||
|
6
Makefile
6
Makefile
@ -116,10 +116,12 @@ tags: $(wildcard src/*.c) $(wildcard src/*.h)
|
||||
# Test targets run against all .krk files in the test/ directory, writing
|
||||
# stdout to `.expect` files, and then comparing with `git`.
|
||||
# To update the tests if changes are expected, run `make test` and commit the result.
|
||||
.PHONY: test stress-test
|
||||
.PHONY: test stress-test update-tests
|
||||
test:
|
||||
@for i in test/*.krk; do echo $$i; KUROKO_TEST_ENV=1 $(TESTWRAPPER) ./kuroko $$i > $$i.actual; diff $$i.expect $$i.actual || exit 1; rm $$i.actual; done
|
||||
|
||||
update-tests:
|
||||
@for i in test/*.krk; do echo $$i; KUROKO_TEST_ENV=1 $(TESTWRAPPER) ./kuroko $$i > $$i.expect; done
|
||||
@git diff --exit-code test/*.expect
|
||||
|
||||
# You can also set TESTWRAPPER to other things to run the tests in other tools.
|
||||
stress-test:
|
||||
|
Loading…
Reference in New Issue
Block a user