mirror of
https://github.com/nineties/planckforth
synced 2024-12-25 21:58:22 +01:00
Add test/fileio.fs
This commit is contained in:
parent
81902f8656
commit
dce5a0ecb5
3 changed files with 17 additions and 0 deletions
|
@ -11,6 +11,7 @@ include lib/tester.fs
|
|||
include test/core.fs
|
||||
include test/utilities.fs
|
||||
include test/coreexttest.fs
|
||||
include test/fileio.fs
|
||||
|
||||
include test/export.fs
|
||||
include lib/string.fs
|
||||
|
|
1
test/fileio-test0.txt
Normal file
1
test/fileio-test0.txt
Normal file
|
@ -0,0 +1 @@
|
|||
ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
15
test/fileio.fs
Normal file
15
test/fileio.fs
Normal file
|
@ -0,0 +1,15 @@
|
|||
\ planckforth -
|
||||
\ Copyright (C) 2021 nineties
|
||||
|
||||
testing file I/O
|
||||
|
||||
T{
|
||||
s" test/fileio-test0.txt" R/O open-file throw
|
||||
constant FILE0 ->
|
||||
}T
|
||||
T{ 32 allocate throw constant BUF -> }T
|
||||
T{ BUF 32 FILE0 read-file throw -> 27 }T
|
||||
T{ s" ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
" BUF 27 strneq -> true }T
|
||||
T{ FILE0 close-file throw -> }T
|
||||
T{ BUF free -> }T
|
Loading…
Reference in a new issue