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
This commit is contained in:
Alex March 2015-09-18 18:46:05 +01:00 committed by Damien George
parent bfb272b9e0
commit 15018291b2
2 changed files with 30 additions and 0 deletions

View File

@ -1,6 +1,16 @@
# check REPL allows to continue input
1 \
+ 2
'"'
"'"
'\''
"\""
'\'('
"\"("
print("\"(")
print('\'(')
print("\'(")
print('\"(')
'abc'
"abc"
'''abc

View File

@ -3,6 +3,26 @@ Micro Python \.\+ version
>>> 1 \\\\
... + 2
3
>>> '"'
'"'
>>> "'"
"'"
>>> '\\\\''
"'"
>>> "\\\\""
'"'
>>> '\\\\'('
"'("
>>> "\\\\"("
'"('
>>> print("\\\\"(")
"(
>>> print('\\\\'(')
'(
>>> print("\\\\'(")
'(
>>> print('\\\\"(')
"(
>>> 'abc'
'abc'
>>> "abc"