diff options
| author | Damien George <damien@micropython.org> | 2022-04-13 17:39:05 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-04-22 17:00:16 +1000 |
| commit | 6bec5c4da52c323c8e2a7a37aa29584cd726612f (patch) | |
| tree | be723bfe90c01be4534c964c39a676f42b757ea0 | |
| parent | 6d401be4dd0164cb197a05c7419f7b6ef5bbdf51 (diff) | |
tests/cmdline: Add test for REPL auto-indent.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | tests/cmdline/repl_autoindent.py | 16 | ||||
| -rw-r--r-- | tests/cmdline/repl_autoindent.py.exp | 22 |
2 files changed, 38 insertions, 0 deletions
diff --git a/tests/cmdline/repl_autoindent.py b/tests/cmdline/repl_autoindent.py new file mode 100644 index 000000000..152c81895 --- /dev/null +++ b/tests/cmdline/repl_autoindent.py @@ -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) + diff --git a/tests/cmdline/repl_autoindent.py.exp b/tests/cmdline/repl_autoindent.py.exp new file mode 100644 index 000000000..9127a7d31 --- /dev/null +++ b/tests/cmdline/repl_autoindent.py.exp @@ -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 +>>> |
