Only respond to new check-expects in REPL - #230
Conversation
|
This seems like an improvement to me too, but I wonder if it would be easy to make the new behavior like this: Also, I think it is possible to add a test case for this. Is there already a test suite for repl stuff in the #lang teaching languages? |
|
"Also, I think it is possible to add a test case for this. Is there already a test suite for repl stuff in the #lang teaching languages?”
Really? I am unaware of this test suite. Is it in the drracket world? (If I had known I would have pointed Shuhung there.)
|
I think that the module-lang test suite in the DrRacket world is close enough that it could be made to fit, but looking at the changes I think that probably it is preferable to do something inside just this repo. One could use |
|
I added some tests to
Yes, but the setup of |
How about I open an issue about this? I think it's simpler if the response (i.e. "the test failed") is not just for the REPL but for the whole test engine. |
Okay. Do you want to merge this one now? It seems okay to me to do so (and we can merge the tests in the other PR in drr when you're ready over there). |
(#689) * Add some tests for racket/htdp#228, racket/htdp#229, and racket/htdp#230 to `tests/drracket/module-lang-test`. + Tests of racket/htdp#229 should first save the buffer to disk before running + Some racket/htdp#229 tests are ported from htdp-test:intm-lam.rktl * Update `tests/drracket/language-test` to match racket/htdp#229. * Manually check for empty stderr in tests/drracket/module-lang-test Somehow `-e`/`--check-stderr` does not work with `tests/drracket/module-lang-test` (perhaps due to using `test-log` + `exit 0` in `fire-up-drracket-and-run-tests`?) * Test utils: sleep for 0.1s after printing error msg In tests/drracket/module-lang-test, stderr goes through a pipe to be checked for the absence of error messages. Therefore, sleep for 0.1s before existing to let the background thread pipe the messages to terminal.
#lang SLs and menu-based SLs use different test engine UIs:
Consequently, when a new
check-expectis executed from REPL, I think #lang SLs should only respond to it rather than printing the outcome of all existing tests. In contrast, it makes sense for menu-based SLs to retain its current behavior.This PR changes #lang SLs by clearing all tests before executing REPL inputs. It does not affect menu-based SLs.
Example program:
Old behavior:
New behavior: