You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing this to `repl-session`, it will start the Chez Scheme interpreter, waiting for the `>` prompt to appear. It then changes the prompt to a generated `uuid4` code, for instance `27e87a8a-742c-4501-b05d-b05814f5a010> `. This will make sure that we can't accidentally match something else for an interactive prompt (imagine we're generating some XML!). Since commands are also echoed to standard out, we need to strip them from the resulting output. Running this should give:
@@ -76,15 +76,27 @@ This looks very similar to the previous example:
Then, a session is a list of commands. Each command should be a UTF-8 string, and we allow to attach some meta-data like expected MIME type for the output. We can also pass an expected output in the case of a documentation test. If `output` was already given on the input, it is moved to `expected`. This way it becomes really easy to setup regression tests on your documentation. Just rerun on the generated output file.
@@ -142,6 +182,7 @@ class ReplCommand(msgspec.Struct):
142
182
output (str | None): evaluated output.
143
183
expected (str | None): expected output.
144
184
"""
185
+
145
186
command: str
146
187
output_type: str="text/plain"
147
188
output: str|None=None
@@ -155,8 +196,11 @@ class ReplSession(msgspec.Struct):
155
196
config (ReplConfig): Config for setting up a REPL session.
156
197
commands (list[ReplCommand]): List of commands in the session.
0 commit comments