test/read.ss
(module read mzscheme
  (require "../read.ss"
           (planet "test.ss" ("schematics" "schemeunit.plt" 1)))
  (provide read-test)
  
  (define text "1 (a b)")
  
  (define read-test
    (make-test-suite "read.ss"
      (make-test-case "read-all"
        (assert-equal? (read-all (open-input-string ""))
                       '())
        (assert-equal? (read-all (open-input-string text))
                       '(1 (a b))))
      ;; read-all/file not tested
      (make-test-case "read-all-syntax"
        (let ((stxs (read-all-syntax #f (open-input-string text))))
          (assert-true (list? stxs))
          (assert-true (andmap syntax? stxs))
          (assert-equal? (map syntax-object->datum stxs)
                         '(1 (a b)))))
      ;; read-all-syntax/file not tested
      ))
  )