test: named query tests are broken when missing Xapian FieldProcessor

Named queries don't work without Xapian FieldProcessor.  Rather than
silently skipping them, we should explictly mark them as broken when
building against an older version of Xapian.
This commit is contained in:
Daniel Kahn Gillmor 2017-12-05 21:33:23 -05:00 committed by David Bremner
parent 776a2982ae
commit bace15c275

View file

@ -50,21 +50,28 @@ notmuch restore < BEFORE
notmuch dump | grep '^#@' > OUTPUT
test_expect_equal_file QUERIES.BEFORE OUTPUT
if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 1 ]; then
test_begin_subtest "search named query"
notmuch search query:test > OUTPUT
notmuch search $QUERYSTR > EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search named query with other terms"
notmuch search query:test and subject:Maildir > OUTPUT
notmuch search $QUERYSTR and subject:Maildir > EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search nested named query"
notmuch search query:test2 > OUTPUT
notmuch search $QUERYSTR2 > EXPECTED
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search named query"
notmuch search query:test > OUTPUT
notmuch search $QUERYSTR > EXPECTED
if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -ne 1 ]; then
test_subtest_known_broken
fi
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search named query with other terms"
notmuch search query:test and subject:Maildir > OUTPUT
notmuch search $QUERYSTR and subject:Maildir > EXPECTED
if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -ne 1 ]; then
test_subtest_known_broken
fi
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "search nested named query"
notmuch search query:test2 > OUTPUT
notmuch search $QUERYSTR2 > EXPECTED
if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -ne 1 ]; then
test_subtest_known_broken
fi
test_expect_equal_file EXPECTED OUTPUT
test_done