SuzanneSoy / repltest

REPLtest: Copy-paste your REPL interactions, and have them run as tests
http://docs.racket-lang.org/repltest/
Other
2 stars 0 forks source link

The module is evaluated twice #2

Closed SuzanneSoy closed 8 years ago

SuzanneSoy commented 8 years ago

When running the file below, the "message" is displayed twice.

#lang repltest racket
(displayln "message")
(define x 1)
> x
1
SuzanneSoy commented 8 years ago

This is because the module is eval'd when run. It would be preferable to eval only when the test submodule is run, but I do not know what is the best way to create a submodule without potentially interfering with the user-provided language's #%module-begin syntax.