aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorggjulio <juligonz@student.42.fr>2020-09-11 19:36:17 +0200
committerggjulio <juligonz@student.42.fr>2020-09-11 19:36:17 +0200
commit7904cbeb9fea96e695b248c93182834046ecc507 (patch)
tree2950f4f348298bb0bb373eec45d15ec2e1abf7be /src
parentda03313a87b4798ec60da66f1bbe5ab64ab8a473 (diff)
downloadminishell_test-7904cbeb9fea96e695b248c93182834046ecc507.tar.gz
minishell_test-7904cbeb9fea96e695b248c93182834046ecc507.tar.bz2
minishell_test-7904cbeb9fea96e695b248c93182834046ecc507.zip
test escape in simple and double quote
Diffstat (limited to 'src')
-rw-r--r--src/suites/preprocess.py40
1 files changed, 36 insertions, 4 deletions
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 <charles.cabergs@gmail.com> +#+ +:+ +#+ #
+# By: juligonz <juligonz@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# 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):