aboutsummaryrefslogtreecommitdiff
path: root/src/suites/path.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-09-14 21:35:25 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-09-14 21:35:25 +0200
commitfec33d1621e01e12a7dc64630477318213218ae7 (patch)
treebeaa18fda09bfc2c13aa1e3a4173370fc9bd15a1 /src/suites/path.py
parent55fab322485f67112c789a4a529765b5e6635238 (diff)
downloadminishell_test-fec33d1621e01e12a7dc64630477318213218ae7.tar.gz
minishell_test-fec33d1621e01e12a7dc64630477318213218ae7.tar.bz2
minishell_test-fec33d1621e01e12a7dc64630477318213218ae7.zip
Added more flow and path tests
Diffstat (limited to 'src/suites/path.py')
-rw-r--r--src/suites/path.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/suites/path.py b/src/suites/path.py
index 0e143dd..d2c9272 100644
--- a/src/suites/path.py
+++ b/src/suites/path.py
@@ -6,7 +6,7 @@
# By: charles <me@cacharle.xyz> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/09/09 15:12:58 by charles #+# #+# #
-# Updated: 2020/09/11 20:13:09 by charles ### ########.fr #
+# Updated: 2020/09/14 19:28:30 by charles ### ########.fr #
# #
# ############################################################################ #
@@ -67,3 +67,19 @@ def suite_path(test):
test("ls", exports={"PATH": " "})
test("ls", exports={"PATH": " : "})
test("ls", exports={"PATH": " /bin "})
+ test("ls", exports={"PATH": "/bin:/bin:/bin:/bin"})
+ test("ls", exports={"PATH": ""})
+ test("ls", exports={"PATH": ":"})
+ test("ls", exports={"PATH": ":::::::::::::::::::"})
+ test("ls", exports={"PATH": "/asdfasdf"})
+ test("ls", exports={"PATH": "/usr/asdf:/usr/lib/asdfasdf"})
+ test("ls", setup="unset PATH")
+ test("somecmd", setup="echo '#!/bin/sh\necho bonjour' > somecmd; chmod +x somecmd", exports={"PATH": ""})
+ test("somecmd", setup="echo '#!/bin/sh\necho bonjour' > somecmd; chmod +x somecmd", exports={"PATH": ":"})
+ test("somecmd", setup="echo '#!/bin/sh\necho bonjour' > somecmd; chmod +x somecmd", exports={"PATH": "::::::::"})
+ test("somecmd", setup="echo '#!/bin/sh\necho bonjour' > somecmd; chmod +x somecmd", exports={"PATH": "/asdfasdf"})
+ test("somecmd", setup="echo '#!/bin/sh\necho bonjour' > somecmd; chmod +x somecmd", exports={"PATH": "/usr/asdf:/usr/lib/asdfasdf"})
+ test("somecmd", setup="echo '#!/bin/sh\necho bonjour' > somecmd; chmod +x somecmd; unset PATH")
+ test("somecmd", setup="echo '#!/bin/sh\necho bonjour' > somecmd; chmod +x somecmd", exports={"PATH": "/bin:"})
+ test("somecmd", setup="echo '#!/bin/sh\necho bonjour' > somecmd; chmod +x somecmd", exports={"PATH": ":/bin"})
+ test("somecmd", setup="echo '#!/bin/sh\necho bonjour' > somecmd; chmod +x somecmd", exports={"PATH": ":/bin:"})