diff --git a/collects/lang/htdp-langs.rkt b/collects/lang/htdp-langs.rkt index fa6e7a586b..ed511eaa17 100644 --- a/collects/lang/htdp-langs.rkt +++ b/collects/lang/htdp-langs.rkt @@ -157,11 +157,6 @@ (namespace-require scheme-signature-module-name) ;; hack: the test-engine code knows about the test~object name; we do, too (namespace-set-variable-value! 'test~object (build-test-engine)) - (uncaught-exception-handler - (let ((previous (uncaught-exception-handler))) - (lambda (exc) - (display-results) - (previous exc)))) ;; record signature violations with the test engine (signature-violation-proc (lambda (obj signature message blame) diff --git a/collects/lang/run-teaching-program.rkt b/collects/lang/run-teaching-program.rkt index cad2a8845a..b54a069ec1 100644 --- a/collects/lang/run-teaching-program.rkt +++ b/collects/lang/run-teaching-program.rkt @@ -57,7 +57,6 @@ #f `(,#'module ,module-name ,language-module ,@(map (λ (x) `(require ,x)) teachpacks) - ,@body-exps ,@(if enable-testing? (if (null? body-exps) '() @@ -65,24 +64,26 @@ ;; over to the one that is used in the REPL when module->namepsace ;; grabs a hold of this module to make a namespace for the REPL `(,(syntax-property - #'(define test~object (namespace-variable-value 'test~object)) - 'test-call #t) - (,#'test))) - '())))) + #'(define test~object (namespace-variable-value 'test~object)) + 'test-call #t))) + '()) + ,@body-exps))) rep)))] [(require) (set! state 'done-or-exn) (stepper-syntax-property - (quasisyntax - (let ([done-already? #f]) - (dynamic-wind - void - (lambda () - (dynamic-require ''#,module-name #f)) ;; work around a bug in dynamic-require - (lambda () - (unless done-already? - (set! done-already? #t) - (current-namespace (module->namespace ''#,module-name))))))) + #`(let ([done-already? #f]) + (dynamic-wind + void + (lambda () + (dynamic-require ''#,module-name #f)) ;; work around a bug in dynamic-require + (lambda () + (unless done-already? + (set! done-already? #t) + #,(if enable-testing? + #'(test) + #'(begin)) + (current-namespace (module->namespace ''#,module-name)))))) 'stepper-skip-completely #t)] [(done-or-exn)