projects
/
debian
/
pforth
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Return error code from tests (#137)
[debian/pforth]
/
fth
/
t_tools.fth
diff --git
a/fth/t_tools.fth
b/fth/t_tools.fth
index 72e2c85164fd41583099f6e4e7d19d4b9070918f..87fd6b8d930578e5f761d813516a8383aef92d16 100644
(file)
--- a/
fth/t_tools.fth
+++ b/
fth/t_tools.fth
@@
-14,17
+14,21
@@
decimal
variable TEST-DEPTH
variable TEST-PASSED
variable TEST-FAILED
variable TEST-DEPTH
variable TEST-PASSED
variable TEST-FAILED
+40 constant TEST_EXIT_FAILURE \ returned form pForth to shell
: TEST{
: TEST{
-
depth test-depth !
-
0 test-passed !
-
0 test-failed !
+ depth test-depth !
+ 0 test-passed !
+ 0 test-failed !
;
: }TEST
;
: }TEST
- test-passed @ 4 .r ." passed, "
- test-failed @ 4 .r ." failed." cr
+ test-passed @ 4 .r ." passed, "
+ test-failed @ 4 .r ." failed." cr
+ test-failed @ 0> IF
+ TEST_EXIT_FAILURE bye-code !
+ THEN
;
;