diff --git a/test/issue884-init-defer-file-creation.sh b/test/issue884-init-defer-file-creation.sh new file mode 100755 index 0000000..38c393e --- /dev/null +++ b/test/issue884-init-defer-file-creation.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +set -e + +TMPDIR=${CURR_DIR}tmppack +echo $TMPDIR + +mkdir ${TMPDIR} +cd ${TMPDIR} + +# kill dub init during interactive mode +${DUB} init < /dev/stdin & +sleep 1 +kill $! + +# ensure that no files are left behind +NFILES_PLUS_ONE=`ls -la | wc -l` + +cd ${CURR_DIR} +rm -r ${TMPDIR} + +# ignore sum + "." + ".." +if [ ${NFILES_PLUS_ONE} -gt 3 ]; then + exit 1; +fi