Skip to content

Commit

Permalink
log input & output on failed interactive tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed Jan 11, 2023
1 parent 0c582d9 commit 6247bec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/0-init-interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ function runTest {
local inp=$1
local comp=$2
local dub_ext=${comp##*.}
echo -e $inp | $DUB init $packname &>/dev/null
local outp=$(echo -e $inp | $DUB init $packname)
if [ ! -e $packname/dub.$dub_ext ]; then # it failed
cleanup
die $LINENO "No dub.$dub_ext file has been generated for test $comp."
die $LINENO "No dub.$dub_ext file has been generated for test $comp with input '$inp'. Output: $outp"
fi
if ! diff $packname/dub.$dub_ext "$CURR_DIR"/$comp; then
cleanup
Expand Down

0 comments on commit 6247bec

Please sign in to comment.