#!/usr/bin/env bash test_description='notmuch config' . ./test-lib.sh config_options=( "database.path" "user.name" "user.primary_email" "user.other_email" "new.tags" "maildir.synchronize_flags" ) test_begin_subtest 'getting config: "config get
."' echo -n "" > OUTPUT for i in ${config_options[*]} ; do notmuch config get "${i}" done >> OUTPUT cat >EXPECTED <. [values ...]"' notmuch config set database.path /path/to/maildir notmuch config set user.name "User Name" notmuch config set user.primary_email primary_email@notmuchmail.org notmuch config set user.other_email alt1@notmuchmail.org alt2@notmuchmail.org notmuch config set new.tags tag1 tag2 tag3 notmuch config set maildir.synchronize_flags false echo -n "" > OUTPUT for i in ${config_options[*]} ; do notmuch config get "${i}" done >> OUTPUT cat >EXPECTED <."' notmuch config set database.path notmuch config set user.name notmuch config set user.primary_email notmuch config set user.other_email notmuch config set new.tags notmuch config set maildir.synchronize_flags echo -n "" > OUTPUT for i in ${config_options[*]} ; do notmuch config get "${i}" done >> OUTPUT # FIXME: Not the most robust nor portable solution here... # Especially `hostname --domain' may have unwanted effects on # some platforms, e.g. setting your hostname to "--domain" ;) fallback_name="$(grep $(id -un) /etc/passwd | cut -d ":" -f 5 | cut -d "," -f 1)" fallback_email="$(id -un)@$(hostname).$(hostname --domain)" cat >EXPECTED <