summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorAlex March <alex.march.dev@gmail.com>2015-09-18 18:46:05 +0100
committerDamien George <damien.p.george@gmail.com>2015-09-19 14:06:23 +0100
commit15018291b2d0e2320ec8f46970816eaad1bb012b (patch)
tree4f830cdc2aab27a6ef8643cc592efe79cf813d77 /tests
parentbfb272b9e09394f7594b88018d17d95eea3e18d0 (diff)
downloadmicropython-15018291b2d0e2320ec8f46970816eaad1bb012b.tar.gz
micropython-15018291b2d0e2320ec8f46970816eaad1bb012b.zip
tests: Add escaped quotes tests for REPL.
Test possible combinations of single and double quotes with escaped quotes and parenthesis with and without function calls in REPL. Covers: #1419
Diffstat (limited to 'tests')
-rw-r--r--tests/cmdline/repl_cont.py10
-rw-r--r--tests/cmdline/repl_cont.py.exp20
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/cmdline/repl_cont.py b/tests/cmdline/repl_cont.py
index 06c445d128..e41d46aceb 100644
--- a/tests/cmdline/repl_cont.py
+++ b/tests/cmdline/repl_cont.py
@@ -1,6 +1,16 @@
# check REPL allows to continue input
1 \
+ 2
+'"'
+"'"
+'\''
+"\""
+'\'('
+"\"("
+print("\"(")
+print('\'(')
+print("\'(")
+print('\"(')
'abc'
"abc"
'''abc
diff --git a/tests/cmdline/repl_cont.py.exp b/tests/cmdline/repl_cont.py.exp
index 1f8f9f5fac..185754799d 100644
--- a/tests/cmdline/repl_cont.py.exp
+++ b/tests/cmdline/repl_cont.py.exp
@@ -3,6 +3,26 @@ Micro Python \.\+ version
>>> 1 \\\\
... + 2
3
+>>> '"'
+'"'
+>>> "'"
+"'"
+>>> '\\\\''
+"'"
+>>> "\\\\""
+'"'
+>>> '\\\\'('
+"'("
+>>> "\\\\"("
+'"('
+>>> print("\\\\"(")
+"(
+>>> print('\\\\'(')
+'(
+>>> print("\\\\'(")
+'(
+>>> print('\\\\"(')
+"(
>>> 'abc'
'abc'
>>> "abc"