]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
CLI/config: switch "notmuch config list" to merged config
[notmuch] / test / test-lib.sh
index 29baa0c17d966f0012438aa7d60738778f819a7b..1f438042909d7115778ef19efe47c37ef709b0c4 100644 (file)
@@ -107,6 +107,9 @@ unset GREP_OPTIONS
 # For emacsclient
 unset ALTERNATE_EDITOR
 
+# for reproducibility
+unset EMAIL
+
 add_gnupg_home ()
 {
     [ -e "${GNUPGHOME}/gpg.conf" ] && return
@@ -694,6 +697,14 @@ notmuch_built_with_sanitize ()
     sed 's/^built_with[.]\(.*\)=.*$/built_with.\1=something/'
 }
 
+notmuch_passwd_sanitize ()
+{
+    local user=$(id -un)
+    local fqdn=$(hostname -f)
+    local full_name=$(getent passwd $user | cut -d: -f 5 | cut -d, -f1)
+    sed -e "s/$user/USERNAME/" -e "s/$fqdn/FQDN/" -e "s/$full_name/USER_FULL_NAME/"
+}
+
 notmuch_config_sanitize ()
 {
     notmuch_dir_sanitize | notmuch_built_with_sanitize
@@ -1271,3 +1282,4 @@ test_declare_external_prereq openssl
 test_declare_external_prereq gpgsm
 test_declare_external_prereq ${NOTMUCH_PYTHON}
 test_declare_external_prereq xapian-metadata
+test_declare_external_prereq xapian-delve