From 7904cbeb9fea96e695b248c93182834046ecc507 Mon Sep 17 00:00:00 2001 From: ggjulio Date: Fri, 11 Sep 2020 19:36:17 +0200 Subject: test escape in simple and double quote --- src/suites/preprocess.py | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'src/suites') diff --git a/src/suites/preprocess.py b/src/suites/preprocess.py index 2f36e64..f453653 100644 --- a/src/suites/preprocess.py +++ b/src/suites/preprocess.py @@ -1,14 +1,14 @@ -# ############################################################################ # +# **************************************************************************** # # # # ::: :::::::: # # preprocess.py :+: :+: :+: # # +:+ +:+ +:+ # -# By: charles +#+ +:+ +#+ # +# By: juligonz +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:25:00 by charles #+# #+# # -# Updated: 2020/09/11 14:24:47 by charles ### ########.fr # +# Updated: 2020/09/11 19:35:26 by juligonz ### ########.fr # # # -# ############################################################################ # +# **************************************************************************** # import config from suite import suite @@ -193,6 +193,38 @@ def suite_escape(test): test(r" \ echo bonjour") test(r" \ echo bonjour") + test(r'/bin/echo " \ "') + test(r'/bin/echo " \" "') + test(r'/bin/echo " \' "') + test(r'/bin/echo " \a "') + test(r'/bin/echo " \b "') + test(r'/bin/echo " \| "') + test(r'/bin/echo " \! "') + test(r'/bin/echo " \@ "') + test(r'/bin/echo " \$ "') + test(r'/bin/echo " \$LESS "') + test(r'/bin/echo " \$? "') + test(r'/bin/echo " \\ "') + test(r'/bin/echo " \\\ "') + test(r'/bin/echo " \\\\ "') + test(r'/bin/echo " \\\\\ "') + test(r'/bin/echo " \\\\\\ "') + test(r'/bin/echo " \\\\\\\ "') + test(r'/bin/echo " \\\\\\\\ "') + + test(r"/bin/echo ' \ '") + test(r"/bin/echo ' \" '") + test(r"/bin/echo ' \a '") + test(r"/bin/echo ' \b '") + test(r"/bin/echo ' \| '") + test(r"/bin/echo ' \! '") + test(r"/bin/echo ' \@ '") + test(r"/bin/echo ' \$ '") + test(r"/bin/echo ' $LESS '") + test(r"/bin/echo ' \$? '") + test(r"/bin/echo ' \\ '") + test(r"/bin/echo ' \\\ '") + # @suite(bonus=True) # def suite_glob(test): -- cgit