Re: [PATCH 3/3] test: add tests for --profile CLI option

Subject: Re: [PATCH 3/3] test: add tests for --profile CLI option

Date: Sun, 16 Aug 2026 11:12:23 -0300

To: inwit, notmuch@notmuchmail.org

Cc: inwit

From: David Bremner


inwit <inwit@sindominio.net> writes:
>  
> +xdg_config_cli () {
> +    local dir
> +    local profile=${1:-default}
> +    backup_config
> +    dir="${HOME}/.config/notmuch/${profile}"
> +    rm -rf $dir
I wonder if we should have " " around $dir here?
Basically if $HOME has spaces, the whole build will blow up, but maybe
extra caution for rm -rf is suitable.

>  
> +test_begin_subtest "count with saved query from config file (xdg+cli-profile)"
> +query_name="test${RANDOM}"
> +xdg_config_cli work
> +notmuch --profile=work count query:$query_name > OUTPUT
> +printf "\n[query]\n${query_name} = tag:inbox\n" >> ${CONFIG_PATH}
> +notmuch --profile=work count query:$query_name >> OUTPUT
> +cat <<EOF > EXPECTED
> +0
> +52
> +EOF

For reasons that I didn't track down, these are both failing with 54
instead of 52 for me on current master. Can you double check whether
this is a difference in our environment, or the patches just need
updating?
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: