moved tests to tests

This commit is contained in:
whaffman 2025-03-01 14:32:27 +01:00
parent f9062d4385
commit b671ded205
4 changed files with 5 additions and 3 deletions

2
tests/test_exit.txt Normal file
View File

@ -0,0 +1,2 @@
echo "yeah"
exit

View File

@ -9,16 +9,16 @@ fi
TEXT_FILE=$1
# Step 2: make fclean
make fclean
make -C ../ fclean
# Step 3: make with FLAGS
make -j4 FLAGS="-DNOCOLORS -DNOBANNER -DNOPROMPT"
make -j4 -C ../ FLAGS="-DNOCOLORS -DNOBANNER -DNOPROMPT"
# Add 'export PS1=">"' to the start of the TEXT_FILE
sed -i '1i export PS1="$"' "$TEXT_FILE"
# Step 4: Run ./minishell with the text file as input and redirect output to a temp file
./minishell < "$TEXT_FILE" > minishell_output.txt 2>&1
../minishell < "$TEXT_FILE" > minishell_output.txt 2>&1
# Step 5: Run bash with the text file as input and redirect output to a temp file
export PS1=">"; bash -i < "$TEXT_FILE" > bash_output.txt 2>&1