Skip to content

Commit

Permalink
tests/cmdline: Add test for REPL auto-indent.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <[email protected]>
  • Loading branch information
dpgeorge committed Apr 22, 2022
1 parent 6d401be commit 6bec5c4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/cmdline/repl_autoindent.py
Original file line number Diff line number Diff line change
@@ -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 changes: 22 additions & 0 deletions tests/cmdline/repl_autoindent.py.exp
Original file line number Diff line number Diff line change
@@ -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
>>>

0 comments on commit 6bec5c4

Please sign in to comment.