X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/b183f2635eaf323066f26c7ca22d931d4f4ccd3a..6a833a6e83865f6999707cc30768d07e1351c2cb:/test/test-lib.sh diff --git a/test/test-lib.sh b/test/test-lib.sh index 62e123d6..29ec0083 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -13,7 +13,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/ . +# along with this program. If not, see https://www.gnu.org/licenses/ . if [ ${BASH_VERSINFO[0]} -lt 4 ]; then echo "Error: The notmuch test suite requires a bash version >= 4.0" @@ -674,6 +674,12 @@ NOTMUCH_NEW () notmuch new "${@}" | grep -v -E -e '^Processed [0-9]*( total)? file|Found [0-9]* total file' } +NOTMUCH_DUMP_TAGS () +{ + # this relies on the default format being batch-tag, otherwise some tests will break + notmuch dump --include=tags "${@}" | sed '/^#/d' | sort +} + notmuch_search_sanitize () { perl -pe 's/("?thread"?: ?)("?)................("?)/\1\2XXX\3/' @@ -740,6 +746,11 @@ notmuch_built_with_sanitize () sed 's/^built_with[.]\(.*\)=.*$/built_with.\1=something/' } +notmuch_config_sanitize () +{ + notmuch_dir_sanitize | notmuch_built_with_sanitize +} + # End of notmuch helper functions # Use test_set_prereq to tell that a particular prerequisite is available.