Open Wolfthuk opened 7 years ago
minishell/builtins/cd/008-symbolic-link-2 (FAILED)
Description: The purpose of this test is to check that using a symbolic link as first argument with the builtin cd results in moving to the linked directory. In this test, the directory is linked with to chained symbolic links.
cd
Before test: 01: rm -f "./symbolic_link1" "./symbolic_link2" 02: mkdir -p "./sub_directory" 03: ln -s "./sub_directory" "./symbolic_link1" 04: ln -s "./symbolic_link1" "./symbolic_link2"
STDIN: 01: cd symbolic_link2 02: /Users/agoomany/TRAVAIL/42ShellTester/tmp/display_pwd 03: /Users/agoomany/TRAVAIL/42ShellTester/tmp/display_env
STDOUT: SUCCESS expected_to match_regex PWD:/Users/agoomany/TRAVAIL/42ShellTester/tmp/sub_directory:PWD$ FAILURE expected_to match_regex ^PWD=/Users/agoomany/TRAVAIL/42ShellTester/tmp/symbolic_link2$ 01: PWD:/Users/agoomany/TRAVAIL/42ShellTester/tmp/sub_directory:PWD 02: ------------------------------ 03: TERM_PROGRAM=iTerm.app 04: TERM=xterm-256color 05: SHELL=/bin/zsh 06: TMPDIR=/var/folders/zz/zyxvpxvq6csfxvn_n0000sc80006b2/T/ 07: Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.LxxX86C7zZ/Render 08: TERM_PROGRAM_VERSION=3.0.10 09: TERM_SESSION_ID=w0t0p0:BE1B3459-0F67-499D-B933-B3179DE1B927 10: USER=agoomany 11: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.LlR8m5zz2Z/Listeners 12: __CF_USER_TEXT_ENCODING=0x1962:0:0 13: PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/munki 14: PWD=/Users/agoomany/TRAVAIL/42ShellTester/tmp/sub_directory 15: LANG=en_US.UTF-8 16: ITERM_PROFILE=Default 17: XPC_FLAGS=0x0 18: XPC_SERVICE_NAME=0 19: SHLVL=2 20: HOME=/Users/agoomany 21: COLORFGBG=7;0 22: ITERM_SESSIONID=w0t0p0:BE1B3459-0F67-499D-B933-B3179DE1B927 23: LESS=-R 24: LOGNAME=agoomany 25: LESSOPEN=|~/.lessfilter %s 26: OLDPWD=/Users/agoomany/TRAVAIL/42ShellTester/tmp 27: =/Users/agoomany/TRAVAIL/42sh/42sh 28: ------------------------------ 29: TOTAL ENVIRONMENT VARIABLES: 25
PWD:/Users/agoomany/TRAVAIL/42ShellTester/tmp/sub_directory:PWD$
^PWD=/Users/agoomany/TRAVAIL/42ShellTester/tmp/symbolic_link2$
STDERR: SUCCESS expected_to be_empty (no output)
minishell/builtins/cd/008-symbolic-link-2 (FAILED)
Description: The purpose of this test is to check that using a symbolic link as first argument with the builtin
cd
results in moving to the linked directory. In this test, the directory is linked with to chained symbolic links.Before test: 01: rm -f "./symbolic_link1" "./symbolic_link2" 02: mkdir -p "./sub_directory" 03: ln -s "./sub_directory" "./symbolic_link1" 04: ln -s "./symbolic_link1" "./symbolic_link2"
STDIN: 01: cd symbolic_link2 02: /Users/agoomany/TRAVAIL/42ShellTester/tmp/display_pwd 03: /Users/agoomany/TRAVAIL/42ShellTester/tmp/display_env
STDOUT: SUCCESS expected_to match_regex
PWD:/Users/agoomany/TRAVAIL/42ShellTester/tmp/sub_directory:PWD$
FAILURE expected_to match_regex^PWD=/Users/agoomany/TRAVAIL/42ShellTester/tmp/symbolic_link2$
01: PWD:/Users/agoomany/TRAVAIL/42ShellTester/tmp/sub_directory:PWD 02: ------------------------------ 03: TERM_PROGRAM=iTerm.app 04: TERM=xterm-256color 05: SHELL=/bin/zsh 06: TMPDIR=/var/folders/zz/zyxvpxvq6csfxvn_n0000sc80006b2/T/ 07: Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.LxxX86C7zZ/Render 08: TERM_PROGRAM_VERSION=3.0.10 09: TERM_SESSION_ID=w0t0p0:BE1B3459-0F67-499D-B933-B3179DE1B927 10: USER=agoomany 11: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.LlR8m5zz2Z/Listeners 12: __CF_USER_TEXT_ENCODING=0x1962:0:0 13: PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/munki 14: PWD=/Users/agoomany/TRAVAIL/42ShellTester/tmp/sub_directory 15: LANG=en_US.UTF-8 16: ITERM_PROFILE=Default 17: XPC_FLAGS=0x0 18: XPC_SERVICE_NAME=0 19: SHLVL=2 20: HOME=/Users/agoomany 21: COLORFGBG=7;0 22: ITERM_SESSIONID=w0t0p0:BE1B3459-0F67-499D-B933-B3179DE1B927 23: LESS=-R 24: LOGNAME=agoomany 25: LESSOPEN=|~/.lessfilter %s 26: OLDPWD=/Users/agoomany/TRAVAIL/42ShellTester/tmp 27: =/Users/agoomany/TRAVAIL/42sh/42sh 28: ------------------------------ 29: TOTAL ENVIRONMENT VARIABLES: 25STDERR: SUCCESS expected_to be_empty (no output)