(module test-semi-read-syntax mzscheme
  (require (planet "test.ss" ("schematics" "schemeunit.plt" 2 10))
           (planet "text-ui.ss" ("schematics" "schemeunit.plt" 2 10))
           (lib "list.ss")
  ;; parse: string -> sexpr
  ;; Quick and dirty function for seeing if we get expected results from semi-read-syntax
  (define (parse text)
     (first (semi-read-syntax-list #f (open-input-string text)))))
  (define semi-read/syntax-tests
      "simple test case"
       (parse "hello")
      "dots are treated as symbols"
       (parse ".")
      "multiple dots"
       (parse "(hello . world . testing!)")
       '(hello |.| world |.| testing!)))
       (parse "'foo")
       (parse "(hello\n;;blah\nworld)")
       '(hello |;;blah| world)))
      "comments 2"
       (parse ";; test: of something -> (that looks contracty)")
       '|;; test: of something -> (that looks contracty)|))
      "hash comments exist"
       (parse "#;foo")
      "hash comments on nested structures"
      (check-equal? (parse "#;(foobar)")
      "multi-line strings"
      (check-equal? (parse "#<<EOF\nhello\nEOF\n")
  (test/text-ui semi-read/syntax-tests))