From: Phil Burk Date: Thu, 12 Jan 2017 17:37:44 +0000 (-0800) Subject: Merge pull request #35 from ellerh/implement-require X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/commitdiff_plain/391238894e9b4c5ba60ff52a995b2cda81242242?hp=-c Merge pull request #35 from ellerh/implement-require Implement REQUIRE (Forth 2012) --- 391238894e9b4c5ba60ff52a995b2cda81242242 diff --combined fth/t_file.fth index 018ca58,e2fb565..297f208 --- a/fth/t_file.fth +++ b/fth/t_file.fth @@@ -60,7 -60,7 +60,7 @@@ include? }T{ t_tools.ft true fp-require-e ! -true value verbose +false value verbose : testing verbose IF @@@ -73,6 -73,9 +73,6 @@@ : s= compare 0= ; : $" state IF postpone s" else ['] s" execute THEN ; immediate -\ FIXME: stubs for missing definitions -: file-status 2drop 0 -1 ; - TESTING File Access word set DECIMAL @@@ -243,6 -246,21 +243,21 @@@ T{ FID1 @ CLOSE-FILE -> 0 } \ Tidy the test folder T{ fn3 DELETE-FILE DROP -> }T + \ ------------------------------------------------------------------------------ + TESTING REQUIRED REQUIRE INCLUDED + \ Tests taken from Forth 2012 RfD + + T{ 0 S" t_required_helper1.fth" REQUIRED + REQUIRE t_required_helper1.fth + INCLUDE t_required_helper1.fth + -> 2 }T + + T{ 0 INCLUDE t_required_helper2.fth + S" t_required_helper2.fth" REQUIRED + REQUIRE t_required_helper2.fth + S" t_required_helper2.fth" INCLUDED + -> 2 }T + \ ---------------------------------------------------------------------------- TESTING two buffers available for S" and/or S\" (Forth 2012)