From 9dd36404646f857c4f250537bac0d9a8ad041d25 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 4 Apr 2015 22:05:30 +0100 Subject: tests: Add missing tests for builtins, and many other things. --- tests/cmdline/repl_cont.py | 21 +++++++++++++++++++++ tests/cmdline/repl_cont.py.exp | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 tests/cmdline/repl_cont.py create mode 100644 tests/cmdline/repl_cont.py.exp (limited to 'tests/cmdline') 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 +>>> -- cgit v1.2.3