tests/cmdline: Add test for MICROPYINSPECT environment variable.
When this variable is set to non-empty string it triggers the REPL after a command/module/file finishes running. The Python file without the file extension is because the cmdline: parser in run-test splits on spaces, so we can't use the -c option since `import os` can't be written without a space.
This commit is contained in:
parent
f1b6e6bb15
commit
4a97f7aaf3
|
@ -0,0 +1,3 @@
|
||||||
|
import uos
|
||||||
|
|
||||||
|
uos.putenv('MICROPYINSPECT', '1')
|
|
@ -0,0 +1,2 @@
|
||||||
|
# cmdline: cmdline/repl_micropyinspect
|
||||||
|
# setting MICROPYINSPECT environment variable before program exit triggers REPL
|
|
@ -0,0 +1,5 @@
|
||||||
|
MicroPython \.\+ version
|
||||||
|
Use \.\+
|
||||||
|
>>> # cmdline: cmdline/repl_micropyinspect
|
||||||
|
>>> # setting MICROPYINSPECT environment variable before program exit triggers REPL
|
||||||
|
>>>
|
Loading…
Reference in New Issue