separate example from test

This commit is contained in:
Sunrim KIM (keen) 2014-08-09 15:09:21 +09:00
parent 114d4b5163
commit ea18e54517
2 changed files with 15 additions and 17 deletions

View File

@ -0,0 +1,15 @@
(import (scheme base)
(scheme read)
(scheme eval)
(scheme write)
(picrin readline)
(picrin readline history))
(let loop ((n 1))
(let ((input (readline "> ")))
(if (eof-object? input)
(newline)
(begin
(add-history input)
(write (eval (read (open-input-string input)) '(picrin user)))
(newline)
(loop 1)))))

View File

@ -1,23 +1,6 @@
(import (scheme base) (import (scheme base)
(scheme read)
(scheme eval)
(scheme write)
(picrin readline)
(picrin readline history) (picrin readline history)
(picrin test)) (picrin test))
;; (let loop ((n 1))
;; (let ((input (readline "> ")))
;; (if (eof-object? input)
;; (newline)
;; (begin
;; (add-history input)
;; (write (eval (read (open-input-string input)) '(picrin user)))
;; (newline)
;; (loop 1)))))
;; (readline "prompt")
(define testfile "picrin_readline_test_file") (define testfile "picrin_readline_test_file")
(test-begin) (test-begin)