...xxxxxxxxxxxxxxxxxxx~xxxxxxxxx..xxxxx..xxx....x....x ---------------------------------------------------------------- minishell/binary/004-binary-test-empty-path (FAILED) Description:  The purpose of this test is to check that the Shell finds binaries that are located in the current directory when the environment variable PATH is empty. Before test:  01: export PATH="" STDIN:  01: write_on_stdout "TOKEN201703202355" STDOUT:  FAILURE expected_to match_regex `TOKEN201703202355`  (no output) STDERR:  FAILURE expected_to be_empty  01: minishell: command not found: write_on_stdout MISC:  SUCCESS expected_to exit_with_status `0` ---------------------------------------------------------------- minishell/binary/005-binary-test-wrong-path (FAILED) Description:  This test purpose is to check if your shell is not able to use binary with a wrong PATH We are changing the actual PATH by PATH=NULL And executing the commande ls Before test:  01: export PATH="/" STDIN:  01: ls STDOUT:  SUCCESS might be_empty  (no output) STDERR:  SUCCESS expected_to_not be_empty  SUCCESS might match_regex `[Cc]ommand not found`  01: minishell: command not found: ls MISC:  FAILURE expected_to_not exit_with_status `0` ---------------------------------------------------------------- minishell/binary/006-binary-undefined-path (FAILED) Description:  The purpose of this test is to check that the Shell retrieves the default value of the environment variable PATH if not set. This test depends on the presence of the UNIX binary `ls`, located in a path within the default environment variable PATH. Before test:  01: rm -rf "TOKEN201703202355_006-BINARY-UNDEFINED-PATH" 02: touch "TOKEN201703202355_006-BINARY-UNDEFINED-PATH" 03: unset PATH STDIN:  01: ls STDOUT:  FAILURE expected_to match_regex `TOKEN201703202355_006-BINARY-UNDEFINED-PATH`  (no output) STDERR:  FAILURE expected_to be_empty  01: minishell: command not found: ls MISC:  SUCCESS expected_to exit_with_status `0` ---------------------------------------------------------------- minishell/binary/007-binary-permission-denied (FAILED) Description:  The purpose of this test is to check that trying to execute a non-permitted binary results in an error on standard error and a failure exit status. Before test:  01: rm -rf ./permission_denied 02: touch ./permission_denied 03: chmod 0 ./permission_denied STDIN:  01: ./permission_denied STDOUT:  SUCCESS might be_empty  (no output) STDERR:  SUCCESS expected_to_not be_empty  SUCCESS might match_regex `[Pp]ermission denied`  01: minishell: permission denied: ./permission_denied MISC:  FAILURE expected_to_not exit_with_status 0 After test:  01: if [ -d "./permission_denied" ]; then chmod 777 "./permission_denied"; fi 02: rm -rf "./permission_denied" ---------------------------------------------------------------- minishell/binary/008-binary-too-many-symbolic-links-encountered (FAILED) Description:  The purpose of this test is to check that trying to execute a path that encounters an infinite loop of symbolic link results in an error on standard error and a failure exit status. Before test:  01: rm -rf ./symbolic_link1 ./symbolic_link2 ./symbolic_link3 02: ln -s ./symbolic_link1 ./symbolic_link2 03: ln -s ./symbolic_link2 ./symbolic_link3 04: ln -s ./symbolic_link3 ./symbolic_link1 STDIN:  01: ./symbolic_link1 STDOUT:  SUCCESS might be_empty  (no output) STDERR:  SUCCESS expected_to_not be_empty  WARNING might match_regex `[Tt]oo many.*symbolic links`  01: minishell: ./symbolic_link1: no such file or directory MISC:  FAILURE expected_to_not exit_with_status 0 ---------------------------------------------------------------- minishell/builtins/cd/001-no-arg (FAILED) Description:  The purpose of this test is to check that using the builtin `cd` without any argument results in moving to the HOME directory. STDIN:  01: cd 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd STDOUT:  SUCCESS expected_to_not match_regex `/Users/ariard/Projects/42sh/42shelltest-tmp/tmp$`  FAILURE expected_to match_regex `PWD:/Users/ariard:PWD`  01: /Users/ariard STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/002-current-directory (FAILED) Description:  The purpose of this test is to check that using `.` as first argument with the builtin `cd` results in not changing current directory. STDIN:  01: cd . 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd 03: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  SUCCESS expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD`  FAILURE expected_to match_regex `^PWD=/Users/ariard/Projects/42sh/42shelltest-tmp/tmp$`  01: PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/003-current-directory-2 (FAILED) Description:  The purpose of this test is to check that using a relative path to the current directory as argument with the builtin `cd` results in not changing the current directory. The environment variable must not be changed. STDIN:  01: cd ../tmp 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd 03: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  SUCCESS expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD`  FAILURE expected_to match_regex `^PWD=/Users/ariard/Projects/42sh/42shelltest-tmp/tmp$`  01: PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/004-parent-directory (FAILED) Description:  The purpose of this test is to check that using `..` as first argument with the builtin `cd` results in moving to the parent directory. STDIN:  01: cd .. 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd 03: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  SUCCESS expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp:PWD$`  FAILURE expected_to match_regex `^PWD=/Users/ariard/Projects/42sh/42shelltest-tmp$`  01: PWD:/Users/ariard/Projects/42sh/42shelltest-tmp:PWD STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/005-root-path (FAILED) Description:  The purpose of this test is to check that using the root path as first argument with the builtin `cd` results in moving to the correct directory. STDIN:  01: cd / 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd 03: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  SUCCESS expected_to match_regex `PWD:/:PWD`  FAILURE expected_to match_regex `^PWD=/$`  01: PWD:/:PWD STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/006-root-path-2 (FAILED) Description:  The purpose of this test is to check that using the root path as first argument with the builtin `cd` results in moving to the correct directory. STDIN:  01: cd /. 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd 03: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  SUCCESS expected_to match_regex `PWD:/:PWD`  FAILURE expected_to match_regex `^PWD=/$`  01: PWD:/:PWD STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/007-symbolic-link (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 the linked directory. Before test:  01: rm -f "./symbolic_link" 02: mkdir -p "./sub_directory" 03: ln -s "./sub_directory" "./symbolic_link" STDIN:  01: cd symbolic_link 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd 03: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  SUCCESS expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/sub_directory:PWD$`  FAILURE expected_to match_regex `^PWD=/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/symbolic_link$`  01: PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/sub_directory:PWD 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/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd 03: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  SUCCESS expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/sub_directory:PWD$`  FAILURE expected_to match_regex `^PWD=/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/symbolic_link2$`  01: PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/sub_directory:PWD STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/010-update-OLDPWD (FAILED) Description:  The purpose of this test is to check that using the builtin `cd` results in a modified environment variable `PWD`. Before test:  01: rm -rf "TOKEN201703202355" 02: mkdir -p "./TOKEN201703202355/TOKEN201703202355" STDIN:  01: cd TOKEN201703202355 02: cd TOKEN201703202355 03: ../../display_env STDOUT:  FAILURE expected_to match_regex `^PWD=/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/TOKEN201703202355/TOKEN201703202355$`  FAILURE expected_to match_regex `^OLDPWD=/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/TOKEN201703202355$`  (no output) STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/011-dotdot (FAILED) Description:  The purpose of this test is to check that playing with relative paths with the builtin `cd` results in correctly changing the current directory. Before test:  01: rm -rf "playing_with_dotdot" 02: mkdir -p "playing_with_dotdot/1/2/3/4/5/6/7/8/9/10" STDIN:  01: cd playing_with_dotdot 02: cd ../playing_with_dotdot 03: cd 1/2/3/4/../4/../4/../../3/4/5/6/7/8/9/10 04: cd ../../../../../../../../../../1/2/3/4/5 05: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd 06: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  FAILURE expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/playing_with_dotdot/1/2/3/4/5:PWD`  FAILURE expected_to match_regex `^PWD=/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/playing_with_dotdot/1/2/3/4/5$`  (no output) STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/012-dot (FAILED) Description:  The purpose of this test is to check that playing with relative paths to the current directory with the builtin `cd` results in not changing the current directory. STDIN:  01: cd . 02: cd ./ 03: cd ./. 04: cd ././ 05: cd ./././././././././. 06: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd 07: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  SUCCESS expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD`  FAILURE expected_to match_regex `^PWD=/Users/ariard/Projects/42sh/42shelltest-tmp/tmp$`  01: PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/013-absolute-path (FAILED) Description:  The purpose of this test is to check that using an absolute path as first argument with the builtin `cd` results in moving to the correct directory. Before test:  01: rm -rf "./my_sub_directory" 02: mkdir -p "./my_sub_directory/and_another_one/" STDIN:  01: cd /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/my_sub_directory/and_another_one 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd 03: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  SUCCESS expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/my_sub_directory/and_another_one:PWD`  FAILURE expected_to match_regex `^PWD=/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/my_sub_directory/and_another_one$`  01: PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/my_sub_directory/and_another_one:PWD STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/errors/001-not-a-directory (FAILED) Description:  The purpose of this test is to check that using a file name as first argument with the builtin `cd` results in error and not changing current directory. Before test:  01: touch "./not_a_directory" STDIN:  01: cd not_a_directory 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd STDOUT:  FAILURE expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD`  (no output) STDERR:  SUCCESS expected_to_not be_empty  WARNING might match_regex `[Nn]ot a directory`  01: cd: no such file or directory: not_a_directory ---------------------------------------------------------------- minishell/builtins/cd/errors/002-not-a-directory-2 (FAILED) Description:  The purpose of this test is to check that using a file name as first argument with the builtin `cd` results in a Shell termination with a failure exit status. Before test:  01: touch "./not_a_directory" STDIN:  01: cd not_a_directory STDOUT:  (no output) STDERR:  01: cd: no such file or directory: not_a_directory MISC:  FAILURE expected_to_not exit_with_status `0` ---------------------------------------------------------------- minishell/builtins/cd/errors/003-permission-denied (WARNING) Description:  The purpose of this test is to check that using a directory without any permission as first argument with the builtin `cd` results in error and not changing current directory. Before test:  01: if [ -d "./permission_denied" ]; then chmod 777 "./permission_denied"; fi 02: rm -rf "./permission_denied" 03: mkdir -m 0 "./permission_denied" STDIN:  01: cd permission_denied 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd STDOUT:  SUCCESS expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD`  01: PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD STDERR:  SUCCESS expected_to_not be_empty  WARNING might match_regex `[Pp]ermission denied`  01: cd: no such file or directory: permission_denied After test:  01: if [ -d "./permission_denied" ]; then chmod 777 "./permission_denied"; fi 02: rm -rf "./permission_denied" ---------------------------------------------------------------- minishell/builtins/cd/errors/004-permission-denied-2 (FAILED) Description:  The purpose of this test is to check that using a directory without any permission as first argument with the builtin `cd` results in error and not changing current directory. Before test:  01: if [ -d "./permission_denied" ]; then chmod 777 "./permission_denied"; fi 02: rm -rf "./permission_denied" 03: mkdir -m 0 "./permission_denied" STDIN:  01: cd permission_denied STDOUT:  (no output) STDERR:  01: cd: no such file or directory: permission_denied MISC:  FAILURE expected_to_not exit_with_status `0` After test:  01: if [ -d "./permission_denied" ]; then chmod 777 "./permission_denied"; fi 02: rm -rf "./permission_denied" ---------------------------------------------------------------- minishell/builtins/cd/errors/005-too-many-symbolic-links-encountered (FAILED) Description:  The purpose of this test is to check that using a symbolic link resulting in ELOOP error as first argument with the builtin `cd` results in error and not changing current directory. Before test:  01: rm -f "./symbolic_link1" "./symbolic_link2" "./symbolic_link3" 02: ln -s "./symbolic_link1" "./symbolic_link2" 03: ln -s "./symbolic_link2" "./symbolic_link3" 04: ln -s "./symbolic_link3" "./symbolic_link1" STDIN:  01: cd symbolic_link1 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd STDOUT:  FAILURE expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD`  (no output) STDERR:  SUCCESS expected_to_not be_empty  WARNING might match_regex `[Tt]oo many.*symbolic links`  01: cd: no such file or directory: symbolic_link1 ---------------------------------------------------------------- minishell/builtins/cd/errors/006-too-many-symbolic-links-encountered-2 (FAILED) Description:  The purpose of this test is to check that using a symbolic link resulting in ELOOP error as first argument with the builtin `cd` results in a Shell termination with a failure exit status. Before test:  01: rm -f "./symbolic_link1" "./symbolic_link2" "./symbolic_link3" 02: ln -s "./symbolic_link1" "./symbolic_link2" 03: ln -s "./symbolic_link2" "./symbolic_link3" 04: ln -s "./symbolic_link3" "./symbolic_link1" STDIN:  01: cd symbolic_link1 STDOUT:  (no output) STDERR:  01: cd: no such file or directory: symbolic_link1 MISC:  FAILURE expected_to_not exit_with_status `0` ---------------------------------------------------------------- minishell/builtins/cd/errors/007-no-such-file-or-directory (FAILED) Description:  The purpose of this test is to check that using a non-existing path as first argument with the builtin `cd` results in error and not changing current directory. Before test:  01: rm -f "./no_such_file_or_directory" STDIN:  01: cd no_such_file_or_directory 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd STDOUT:  FAILURE expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD`  (no output) STDERR:  SUCCESS expected_to_not be_empty  SUCCESS might match_regex `[Nn]o such file or directory`  01: cd: no such file or directory: no_such_file_or_directory ---------------------------------------------------------------- minishell/builtins/cd/errors/008-no-such-file-or-directory-2 (FAILED) Description:  The purpose of this test is to check that using a non-existing path as first argument with the builtin `cd` results in a Shell termination with an error status code. Before test:  01: rm -f "./no_such_file_or_directory" STDIN:  01: cd no_such_file_or_directory STDOUT:  (no output) STDERR:  01: cd: no such file or directory: no_such_file_or_directory MISC:  FAILURE expected_to_not exit_with_status `0` ---------------------------------------------------------------- minishell/builtins/cd/errors/009-no-such-file-or-directory-symlink (FAILED) Description:  The purpose of this test is to check that using a symbolic link that targets to a non-existing directory with the builtin `cd` results in error and not changing current directory. Before test:  01: rm -rf "./enoent_symlink" "./enoent_directory" 02: ln -s "./enoent_directory" "./enoent_symlink" STDIN:  01: cd ./enoent_symlink 02: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd STDOUT:  FAILURE expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD`  (no output) STDERR:  SUCCESS expected_to_not be_empty  SUCCESS might match_regex `[Nn]o such file or directory`  01: cd: no such file or directory: ./enoent_symlink ---------------------------------------------------------------- minishell/builtins/cd/errors/010-no-such-file-or-directory-symlink-2 (FAILED) Description:  The purpose of this test is to check that using a symbolic link that targets to a non-existing directory with the builtin `cd` results in error and not changing current directory. Before test:  01: rm -rf "./enoent_symlink" "./enoent_directory" 02: ln -s "./enoent_directory" "./enoent_symlink" STDIN:  01: cd ./enoent_symlink STDOUT:  (no output) STDERR:  01: cd: no such file or directory: ./enoent_symlink MISC:  FAILURE expected_to_not exit_with_status `0` ---------------------------------------------------------------- minishell/builtins/cd/options/001-not-following-links (FAILED) Description:  The purpose of this test is to check that using symbolic links twice with the builtin `cd` and the option `-P` results in a correct environment variable PWD. The option `-P` makes the Shell to resolve symbolic links. Before test:  01: rm -fr "./sub_directory_link" "./sub_directory" 02: mkdir -p "./sub_directory/sub_sub_directory" 03: ln -s "./sub_directory" "./sub_directory_link" 04: ln -s "./sub_sub_directory" "./sub_directory/sub_sub_directory_link" STDIN:  01: cd -P sub_directory_link 02: cd -P sub_sub_directory_link 03: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_env STDOUT:  FAILURE expected_to match_regex `PWD=/Users/ariard/Projects/42sh/42shelltest-tmp/tmp/sub_directory/sub_sub_directory`  (no output) STDERR:  SUCCESS might be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/cd/options/002-oldpwd (FAILED) Description:  The purpose of this test is to check that using `-` as first argument with the builtin `cd` results in moving the previous current directory. STDIN:  01: cd / 02: cd - 03: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp/display_pwd STDOUT:  FAILURE expected_to match_regex `PWD:/Users/ariard/Projects/42sh/42shelltest-tmp/tmp:PWD`  01: /Users/ariard/Projects/42sh/42shelltest-tmp/tmp STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/env/003-ignore-environment (FAILED) Description:  The purpose of this test is to check that using the option `-i` with the builtin `env` results in an empty environment sent to the given command. STDIN:  01: env -i ./display_env STDOUT:  FAILURE expected_to match_regex `TOTAL ENVIRONMENT VARIABLES: 0`  (no output) STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/env/005-set-variables (FAILED) Description:  The purpose of this test is to check that the builtin `env` can modify or set multiple environment variables before executing the given command. Before test:  01: export VARTEST1="OLD_VALUE" STDIN:  01: env VARTEST1=TOKEN201703202355_1 VARTEST2=TOKEN201703202355_2 VARTEST3=TOKEN201703202355_3 ./display_env STDOUT:  FAILURE expected_to match_regex `VARTEST1=TOKEN201703202355_1`  FAILURE expected_to match_regex `VARTEST2=TOKEN201703202355_2`  FAILURE expected_to match_regex `VARTEST3=TOKEN201703202355_3`  (no output) STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/env/errors/001-command-not-found (FAILED) Description:  The purpose of this test is to check that using the builtin `env` with an invalid binary as argument results in an error and failure exit status. Before test:  01: rm -f "./invalid_binary" STDIN:  01: env ./invalid_binary STDOUT:  (no output) STDERR:  FAILURE expected_to_not be_empty  WARNING might match_regex `[Cc]ommand not found`  (no output) MISC:  SUCCESS expected_to_not exit_with_status `0` ---------------------------------------------------------------- minishell/builtins/env/errors/002-illegal-option (FAILED) Description:  The purpose of this test is to check that using the builtin `env` with an invalid option results in an error and failure exit status. Before test:  01: rm -f -- "-w" STDIN:  01: env -w STDOUT:  (no output) STDERR:  SUCCESS expected_to_not be_empty  SUCCESS might match_regex `([Ii]nvalid|[Ii]llegal) (option|argument)`  01: env: illegal option -- w 02: usage: env [-i] [-u name] [name=value]... [utility [argument...]] MISC:  FAILURE expected_to_not exit_with_status `0` ---------------------------------------------------------------- minishell/builtins/env/multiple-options/001-ignore-environment-and-set-variable (FAILED) Description:  The purpose of this test is to check that `env -i` works if we use a second argument to set an environment variable, we are also checking if this command unset environments variables for a given binary. STDIN:  01: env -i TESTVARIABLE=TOKEN201703202355 ./display_env STDOUT:  FAILURE expected_to match_regex `TESTVARIABLE=TOKEN201703202355`  FAILURE expected_to match_regex `TOTAL ENVIRONMENT VARIABLES: 1`  (no output) STDERR:  SUCCESS expected_to be_empty  (no output) ---------------------------------------------------------------- minishell/builtins/exit/003-status-of-last-command (FAILED) Description:  The purpose of this test is to check that using the builtin `exit` without any argument results in a Shell termination and the exit status of the previous command. STDIN:  01: ./exit_with_status 42 02: exit STDOUT:  SUCCESS might be_empty  (no output) STDERR:  (no output) MISC:  FAILURE expected_to exit_with_status `42` ---------------------------------------------------------------- minishell/builtins/exit/errors/001-too-many-args (FAILED) Description:  The purpose of this test is to check that using a wrong number of arguments with the builtin `exit` does not result in the Shell termination but an error on standard error. STDIN:  01: exit 21 42 02: ./write_on_stdout TOKEN201703202355 STDOUT:  FAILURE expected_to match_regex `TOKEN201703202355`  (no output) STDERR:  FAILURE expected_to_not be_empty  WARNING might match_regex `([Tt]oo many arguments|[Aa]rgument list too long)`  (no output) MISC:  FAILURE expected_to exit_with_status `0` ---------------------------------------------------------------- minishell/builtins/exit/errors/002-non-numeric-argument (FAILED) Description:  The purpose of this test is to check that using a non-numeric argument with the builtin `exit` results in the Shell termination and an error on standard error. STDIN:  01: exit abc 02: ./write_on_stdout TOKEN201703202355 STDOUT:  SUCCESS expected_to_not match_regex `TOKEN201703202355`  (no output) STDERR:  WARNING might_not be_empty  WARNING might match_regex `[Nn]umeric argument required`  (no output) MISC:  FAILURE expected_to_not exit_with_status `0` ---------------------------------------------------------------- minishell/builtins/setenv/004-invalid-identifier (FAILED) Description:  The purpose of this test is to check that using a wrong variable name with the builtin `setenv` (or `export`) results in error. STDIN:  01: setenv 42 02: export 42 STDOUT:  SUCCESS might be_empty  (no output) STDERR:  FAILURE expected_to_not be_empty  WARNING might match_regex `(not.*identifier|must begin.*letter)`  (no output) ---------------------------------------------------------------- minishell/misc/001-copy-of-environment (FAILED) Description:  A Shell must send a copy of the environment to its child processes. Before test:  01: export COPYENV_VAR1="TOKEN201703202355_VAR1" 02: export COPYENV_VAR2="TOKEN201703202355_VAR2" 03: export COPYENV_VAR3="TOKEN201703202355_VAR3" STDIN:  01: ./display_env STDOUT:  FAILURE expected_to match_regex `COPYENV_VAR1=TOKEN201703202355_VAR1`  FAILURE expected_to match_regex `COPYENV_VAR2=TOKEN201703202355_VAR2`  FAILURE expected_to match_regex `COPYENV_VAR3=TOKEN201703202355_VAR3`  (no output) STDERR:  (no output) Total tests: 54 Total failed tests: 38 Total pending tests: 0