tests: Add test for heap lock in REPL.
Signed-off-by: Jeff Epler <jepler@gmail.com>
This commit is contained in:
parent
065f13b114
commit
3bad046b5f
2 changed files with 17 additions and 0 deletions
7
tests/cmdline/repl_lock.py
Normal file
7
tests/cmdline/repl_lock.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import micropython
|
||||
micropython.heap_lock()
|
||||
1+1
|
||||
micropython.heap_lock()
|
||||
####################################################################
|
||||
micropython.heap_lock()
|
||||
raise SystemExit
|
||||
10
tests/cmdline/repl_lock.py.exp
Normal file
10
tests/cmdline/repl_lock.py.exp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
MicroPython \.\+ version
|
||||
Use \.\+
|
||||
>>> import micropython
|
||||
>>> micropython.heap_lock()
|
||||
>>> 1+1
|
||||
2
|
||||
>>> micropython.heap_lock()
|
||||
>>> ####################################################################
|
||||
>>> micropython.heap_lock()
|
||||
>>> raise SystemExit
|
||||
Loading…
Reference in a new issue