summaryrefslogtreecommitdiff
path: root/tests/cmdline
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-04 22:05:30 +0100
committerDamien George <damien.p.george@gmail.com>2015-04-04 22:05:30 +0100
commit9dd36404646f857c4f250537bac0d9a8ad041d25 (patch)
treec6509bcd3c7d5c2e67332110c582df2b5a5c669f /tests/cmdline
parent7e758b1cf878312cab5d9d2825b36e7235ea10a3 (diff)
tests: Add missing tests for builtins, and many other things.
Diffstat (limited to 'tests/cmdline')
-rw-r--r--tests/cmdline/repl_cont.py21
-rw-r--r--tests/cmdline/repl_cont.py.exp32
2 files changed, 53 insertions, 0 deletions
diff --git a/tests/cmdline/repl_cont.py b/tests/cmdline/repl_cont.py
new file mode 100644
index 000000000..66a484ce3
--- /dev/null
+++ b/tests/cmdline/repl_cont.py
@@ -0,0 +1,21 @@
+# check REPL allows to continue input
+1 \
++ 2
+'abc'
+"abc"
+'''abc
+def'''
+"""ABC
+DEF"""
+print(
+1 + 2)
+l = [1,
+2]
+print(l)
+d = {1:'one',
+2:'two'}
+print(d[2])
+def f(x):
+ print(x)
+
+f(3)
diff --git a/tests/cmdline/repl_cont.py.exp b/tests/cmdline/repl_cont.py.exp
new file mode 100644
index 000000000..2405e601c
--- /dev/null
+++ b/tests/cmdline/repl_cont.py.exp
@@ -0,0 +1,32 @@
+Micro Python \.\+ linux version
+>>> # check REPL allows to continue input
+>>> 1 \
+... + 2
+3
+>>> 'abc'
+'abc'
+>>> "abc"
+'abc'
+>>> '''abc
+... def'''
+'abc\ndef'
+>>> """ABC
+... DEF"""
+'ABC\nDEF'
+>>> print(
+... 1 + 2)
+3
+>>> l = [1,
+... 2]
+>>> print(l)
+[1, 2]
+>>> d = {1:'one',
+... 2:'two'}
+>>> print(d[2])
+two
+>>> def f(x):
+... print(x)
+...
+>>> f(3)
+3
+>>>