mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-05 23:18:08 +01:00
inttests: run each test in a clean directory
This commit is contained in:
parent
d8bc528c5a
commit
db1834a620
1 changed files with 6 additions and 1 deletions
7
test.sh
7
test.sh
|
|
@ -7,6 +7,7 @@ declare -i SUCCEDED=0
|
|||
declare -i TODTODO=0
|
||||
declare -i RAN=0
|
||||
NAME=""
|
||||
MINISHELL=$PWD/minishell
|
||||
|
||||
report_header()
|
||||
{
|
||||
|
|
@ -67,7 +68,11 @@ assert()
|
|||
when_run()
|
||||
{
|
||||
cat > /tmp/input.minishell
|
||||
./minishell &> /tmp/got.minishell < /tmp/input.minishell
|
||||
rm -rf /tmp/dir.minishell
|
||||
mkdir -p /tmp/dir.minishell
|
||||
pushd /tmp/dir.minishell > /dev/null
|
||||
$MINISHELL &> /tmp/got.minishell < /tmp/input.minishell
|
||||
popd > /dev/null
|
||||
RAN+=1
|
||||
NAME=$1
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue