tests/cmdline: Add test for REPL auto-indent.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
6d401be4dd
commit
6bec5c4da5
16
tests/cmdline/repl_autoindent.py
Normal file
16
tests/cmdline/repl_autoindent.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# tests for autoindent
|
||||||
|
if 1:
|
||||||
|
print(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if 0:
|
||||||
|
print(2)
|
||||||
|
else:
|
||||||
|
print(3)
|
||||||
|
|
||||||
|
if 0:
|
||||||
|
print(4)
|
||||||
|
else:
|
||||||
|
print(5)
|
||||||
|
|
||||||
22
tests/cmdline/repl_autoindent.py.exp
Normal file
22
tests/cmdline/repl_autoindent.py.exp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
MicroPython \.\+ version
|
||||||
|
Use \.\+
|
||||||
|
>>> # tests for autoindent
|
||||||
|
>>> if 1:
|
||||||
|
... print(1)
|
||||||
|
...
|
||||||
|
...
|
||||||
|
...
|
||||||
|
1
|
||||||
|
>>> if 0:
|
||||||
|
... print(2)
|
||||||
|
... else:
|
||||||
|
... print(3)
|
||||||
|
...
|
||||||
|
3
|
||||||
|
>>> if 0:
|
||||||
|
... print(4)
|
||||||
|
... else:
|
||||||
|
... print(5)
|
||||||
|
...
|
||||||
|
5
|
||||||
|
>>>
|
||||||
Loading…
x
Reference in New Issue
Block a user