From 15018291b2d0e2320ec8f46970816eaad1bb012b Mon Sep 17 00:00:00 2001 From: Alex March Date: Fri, 18 Sep 2015 18:46:05 +0100 Subject: [PATCH] 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 --- tests/cmdline/repl_cont.py | 10 ++++++++++ tests/cmdline/repl_cont.py.exp | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+) 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"