Merge branch 'master' into builtin_source

This commit is contained in:
Bluub
2020-05-07 12:34:42 +02:00
committed by GitHub
7 changed files with 66 additions and 15 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
MYSHELL="$PWD/mysh"
MYSHELL="$PWD/42sh"
REFER="/bin/tcsh -f"
TRAPSIG=0
+11 -10
View File
@@ -13,7 +13,7 @@ char *eval(char *cmd, char **argv, env_t* env);
extern char **environ;
Test(execute, get_path)
Test(execute, get_path, .init = cr_redirect_stdout)
{
env_t *env = malloc(sizeof(env_t));
env->vars = NULL;
@@ -24,16 +24,17 @@ Test(execute, get_path)
cr_assert_fail();
}
Test(execute, absolute)
{
env_t *env = malloc(sizeof(env_t));
env->vars = NULL;
env->env = environ;
char **argv = get_argv("/usr/bin/ls");
// Disabled since github does not have ls in the /usr/bin/ls path.
// Test(execute, absolute, .init = cr_redirect_stdout)
// {
// env_t *env = malloc(sizeof(env_t));
// env->vars = NULL;
// env->env = environ;
// char **argv = get_argv("/usr/bin/ls");
eval(argv[0], argv, env);
cr_assert_fail();
}
// eval(argv[0], argv, env);
// cr_assert_fail();
// }
Test(execute, notfound, .init = cr_redirect_stderr)
{