mirror of
https://github.com/nineties/planckforth
synced 2024-12-26 21:58:42 +01:00
15 lines
334 B
FSharp
15 lines
334 B
FSharp
\ 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
|