Add report-and-exit

This commit is contained in:
Koichi Nakamura 2021-01-11 14:33:11 +09:00
parent 173170cd17
commit 414aa3da6f
2 changed files with 7 additions and 5 deletions

View file

@ -10,4 +10,4 @@ include test/tester.fs
include test/core.fs include test/core.fs
include test/coreplustest.fs include test/coreplustest.fs
print-report report-and-exit

View file

@ -70,14 +70,16 @@ create actual-results 20 cells allot
1 #skip +! 1 #skip +!
; ;
: print-report : report-and-exit
decimal decimal
cr ." --------------------------------" cr ." --------------------------------"
cr ." Run " #ok @ #error @ + #skip @ + . ." tests" cr cr ." Run " #ok @ #error @ + #skip @ + . ." tests" cr
." ok:" #ok @ . green ." ok:" #ok @ .
." failed:" #error @ . red ." failed:" #error @ .
." skipped:" #skip @ . yellow ." skipped:" #skip @ .
reset
cr ." --------------------------------" cr ." --------------------------------"
cr cr
#error @ 0= if bye else abort then
; ;