mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Added more I/O tests
This commit is contained in:
parent
674807a9e2
commit
7103f52f8b
2 changed files with 4 additions and 6 deletions
|
@ -1,10 +1,5 @@
|
|||
(import (scheme base)
|
||||
(scheme file)
|
||||
(scheme write))
|
||||
|
||||
; TODO: I think this compiles OK (test), but interpreter does not like it:
|
||||
;cyclone>
|
||||
(call-with-output-file "test.txt" (lambda (port) (write 'ok port)))
|
||||
;Error: Unable to evaluate: ((procedure () ...) <port>)
|
||||
|
||||
#t
|
||||
|
||||
|
|
|
@ -275,8 +275,11 @@
|
|||
"test.out"
|
||||
(lambda ()
|
||||
(assert:equal "I/O with-*-file test" (read) 'hello-world)))
|
||||
(call-with-output-file "test.txt" (lambda (port) (write 'ok port))) ;; Note: was a good test, did not always work in icyc
|
||||
(call-with-input-file "test.txt" (lambda (port) (assert:equal "read input" (read port) 'ok)))
|
||||
;(write "done with input")
|
||||
;; TODO: (delete-file "test.out")
|
||||
;; TODO: (delete-file "test.txt")
|
||||
;; END I/O
|
||||
|
||||
; TODO: use display, output without surrounding quotes
|
||||
|
|
Loading…
Add table
Reference in a new issue