compare bash and minishell
This commit is contained in:
parent
dd12a170d9
commit
2d0794bbec
17
tests/test.sh
Executable file
17
tests/test.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
minishell_output=$(../minishell -c "$1")
|
||||
minishell_exit_code=$?
|
||||
|
||||
bash_output=$(bash -c "$1")
|
||||
bash_exit_code=$?
|
||||
|
||||
paste <(echo -e "Minishell:\n$minishell_output") <(echo -e "Bash:\n$bash_output") | column -t -s $'\t'
|
||||
echo "Minishell exit code: $minishell_exit_code"
|
||||
echo "Bash exit code: $bash_exit_code"
|
||||
|
||||
if [ $minishell_exit_code -eq $bash_exit_code ]; then
|
||||
echo "Exit codes match."
|
||||
else
|
||||
echo "Exit codes do not match."
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user