From fec33d1621e01e12a7dc64630477318213218ae7 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 14 Sep 2020 21:35:25 +0200 Subject: Added more flow and path tests --- src/suites/path.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/suites/path.py') 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 +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # 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:"}) -- cgit