Refine.
This commit is contained in:
@ -87,8 +87,20 @@ variable tests-found variable tests-run variable tests-passed
|
||||
: check-fresh depth if }confirm ." DEPTH LEAK! " depth . 1 throw then
|
||||
fdepth if }confirm ." FDEPTH LEAK! " fdepth . 1 throw then ;
|
||||
: wrap-test ( xt -- ) expect-reset >r check-fresh r> execute check-fresh expect-finish ;
|
||||
: red 1 fg ; : green 2 fg ; : hr 40 for [char] - emit next cr ;
|
||||
: replace-line 13 emit clear-to-eol ;
|
||||
: red ; : green ; : replace-line cr ; : old-normal normal ; : normal ;
|
||||
DEFINED? posix [IF]
|
||||
also posix stdout isatty previous [IF]
|
||||
: red 1 fg ; : green 2 fg ;
|
||||
: replace-line 13 emit clear-to-eol ;
|
||||
: normal old-normal ;
|
||||
[THEN]
|
||||
[THEN]
|
||||
DEFINED? windows [IF]
|
||||
: red 1 fg ; : green 2 fg ;
|
||||
: replace-line 13 emit clear-to-eol ;
|
||||
: normal old-normal ;
|
||||
[THEN]
|
||||
: hr 40 for [char] - emit next cr ;
|
||||
: label-test ( xt -- ) replace-line >name type ;
|
||||
: run-test ( xt -- ) dup label-test only forth confirm{ ['] wrap-test catch }confirm
|
||||
if drop ( cause xt restored on throw ) red ." FAILED" normal cr
|
||||
|
||||
@ -53,6 +53,7 @@ z" free" 1 sysfunc sysfree
|
||||
z" realloc" 2 sysfunc realloc
|
||||
z" usleep" 1 sysfunc usleep
|
||||
z" signal" 2 sysfunc signal
|
||||
z" isatty" 1 sysfunc isatty
|
||||
|
||||
( Processes )
|
||||
z" fork" 0 sysfunc fork
|
||||
|
||||
@ -23,7 +23,7 @@ Importation('gen/windows_boot_extra.h', '$src/windows/windows_boot_extra.fs',
|
||||
# Compile Win32.
|
||||
Alias('win32', ' '.join([
|
||||
ForthTest('tests/win32_all_tests.out', 'windows/uEf32.exe', '$src/common/all_tests.fs',
|
||||
interp='wine', pool='console'),
|
||||
interp='wine'),
|
||||
]))
|
||||
CompileW32('windows/uEf32.obj', '$src/windows/main.c',
|
||||
implicit=['gen/windows_boot.h', 'gen/windows_boot_extra.h'])
|
||||
@ -33,7 +33,7 @@ LinkW32('windows/uEf32.exe',
|
||||
# Compile Win64.
|
||||
Alias('win64', ' '.join([
|
||||
ForthTest('tests/win64_all_tests.out', 'windows/uEf64.exe', '$src/common/all_tests.fs',
|
||||
interp='wine', pool='console'),
|
||||
interp='wine'),
|
||||
]))
|
||||
CompileW64('windows/uEf64.obj', '$src/windows/main.c',
|
||||
implicit=['gen/windows_boot.h', 'gen/windows_boot_extra.h'])
|
||||
|
||||
Reference in New Issue
Block a user