1#!/usr/bin/env bash
2test_description="indexing of html parts"
3. $(dirname "$0")/test-lib.sh || exit 1
4
5add_email_corpus html
6
7test_begin_subtest 'embedded images should not be indexed'
8notmuch search kwpza7svrgjzqwi8fhb2msggwtxtwgqcxp4wbqr4wjddstqmeqa7 > OUTPUT
9test_expect_equal_file /dev/null OUTPUT
10
11test_begin_subtest 'ignore > in attribute text'
12notmuch search swordfish | notmuch_search_sanitize > OUTPUT
13test_expect_equal_file /dev/null OUTPUT
14
15test_begin_subtest 'non tag text should be indexed'
16notmuch search hunter2 | notmuch_search_sanitize > OUTPUT
17cat <<EOF > EXPECTED
18thread:XXX   2009-11-17 [1/1] David Bremner; test html attachment (inbox unread)
19EOF
20test_expect_equal_file EXPECTED OUTPUT
21
22test_done
23