added a test for values that print out as part of the scheme language top-level printing

svn: r11375
This commit is contained in:
Robby Findler 2008-08-21 22:54:52 +00:00
parent 607c13017f
commit a9592f0d46
3 changed files with 24 additions and 5 deletions

View File

@ -200,7 +200,7 @@
(define (insert-in-interactions frame str)
(put-in-frame (lambda (x) (send x get-interactions-canvas)) frame str #t))
(define (put-in-frame get-canvas frame str/sexp paste?)
(define (put-in-frame get-canvas frame str/sexp just-insert?)
(let ([str (if (string? str/sexp)
str/sexp
(let ([port (open-output-string)])
@ -212,7 +212,7 @@
(fw:test:new-window canvas)
(let ([editor (send canvas get-editor)])
(send editor set-caret-owner #f)
(if paste? (send editor insert str) (type-string str))))))
(if just-insert? (send editor insert str) (type-string str))))))
;; type-string : string -> void
;; to call test:keystroke repeatedly with the characters

View File

@ -19,9 +19,9 @@
(lambda (file) (path->string (build-path here file)))))
(define tests '())
(define (test defs ints res [all? #f])
(set! tests (cons (make-test (if (string? defs) defs (format "~s" defs))
ints res all?)
(define (test definitions interactions results [all? #f])
(set! tests (cons (make-test (if (string? definitions) definitions (format "~s" definitions))
interactions results all?)
tests)))
(define temp-files '())

View File

@ -23,6 +23,21 @@
(/ 888 2)
(provide (except-out (all-from-out scheme/base) #%top-interaction))))
;; this test doesn't pass yet, but the test isn't testing the right thing yet either.
#;
(test @t{#lang scheme
(define-syntax (f stx)
(syntax-case stx ()
[(f)
(raise (make-exn:fail:syntax "both" (current-continuation-marks) (list #'f stx)))]))}
@t{(f)}
#<<--
. . both in:
f
(f)
--
)
(test @t{}
#f
@rx{Module Language: There must be a valid module
@ -56,6 +71,10 @@
collection not found
Interactions disabled}
#t)
(test @t{#lang scheme
3}
#f
"3")
(test @t{(module m mzscheme (provide x) (define x 1))}
@t{x}
"1")