-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-14 Fix
LOAD
infinite loop input handling in p4Refill() and
p4Accept(); add start of Block word test suite.
- Loading branch information
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
INCLUDE ../test/assert.p4 | ||
|
||
[UNDEFINED] BLOCK-OPEN [IF] | ||
|
||
.( Block file support disabled. ) CR | ||
|
||
[ELSE] | ||
|
||
MARKER rm_block_tests | ||
|
||
: tw_tmp_blk S" /tmp/tmp.blk" ; | ||
|
||
.( BLOCK-OPEN BLOCK-CLOSE ) test_group | ||
t{ tw_tmp_blk BLOCK-OPEN -> TRUE }t | ||
\ t{ :NONAME 1 LOAD ; CATCH -> -33 }t | ||
t{ BLOCK-CLOSE -> }t | ||
t{ tw_tmp_blk DELETE-FILE -> 0 }t | ||
test_group_end | ||
|
||
.( BLK BUFFER UPDATE SAVE-BUFFERS ) test_group | ||
t{ tw_tmp_blk BLOCK-OPEN | ||
1 BUFFER DUP 1024 BLANK | ||
CHAR ^ PARSE S" SOURCE-ID BLK @ " EVALUATE ^ ROT SWAP CMOVE | ||
UPDATE SAVE-BUFFERS BLOCK-CLOSE | ||
-> TRUE }t | ||
test_group_end | ||
|
||
.( LOAD ) test_group | ||
t{ tw_tmp_blk BLOCK-OPEN 1 LOAD -> TRUE -1 0 }t | ||
t{ BLOCK-CLOSE tw_tmp_blk DELETE-FILE -> 0 }t | ||
test_group_end | ||
|
||
rm_block_tests | ||
|
||
[THEN] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters