Re: [PATCH 5/9] test: test relative paths for database.hook_dir

Subject: Re: [PATCH 5/9] test: test relative paths for database.hook_dir

Date: Fri, 07 May 2021 15:34:09 +0300

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Fri, May 07 2021, David Bremner wrote:

> ---
>  test/T400-hooks.sh | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/test/T400-hooks.sh b/test/T400-hooks.sh
> index 3a2df2f4..00c99337 100755
> --- a/test/T400-hooks.sh
> +++ b/test/T400-hooks.sh
> @@ -43,7 +43,7 @@ add_message
>  # create maildir structure for notmuch-insert
>  mkdir -p "$MAIL_DIR"/{cur,new,tmp}
>  
> -for config in traditional profile explicit XDG split; do
> +for config in traditional profile explicit relative XDG split; do
>      unset NOTMUCH_PROFILE
>      notmuch config set database.hook_dir
>      notmuch config set database.path ${MAIL_DIR}
> @@ -63,6 +63,11 @@ for config in traditional profile explicit XDG split; do
>  	    mkdir -p $HOOK_DIR
>  	    notmuch config set database.hook_dir $HOOK_DIR
>  	    ;;
> +	relative)
> +	    HOOK_DIR=${HOME}/.notmuch-hooks
> +	    mkdir -p $HOOK_DIR

I'd drop the -p, to be sure $HOOK_DIR does not exist before test run
(if it existed, one notices when it fails (or not, we don't fail on error
:/ -- anyway noise to terminal/log (hopefully)


> +	    notmuch config set database.hook_dir .notmuch-hooks
> +	    ;;
>  	XDG)
>  	    HOOK_DIR=${HOME}/.config/notmuch/default/hooks
>  	    ;;
> -- 
> 2.30.2
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: