unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: Todd <todd@electricoding.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2 1/5] Add a failing unit test for indexed mime types
Date: Thu, 15 Jan 2015 19:19:04 +0200	[thread overview]
Message-ID: <871tmw9d2v.fsf@nikula.org> (raw)
In-Reply-To: <87a91k9dj3.fsf@nikula.org>

On Thu, 15 Jan 2015, Jani Nikula <jani@nikula.org> wrote:
> On Wed, 14 Jan 2015, Todd <todd@electricoding.com> wrote:
>> ---
>>  test/T190-multipart.sh | 32 ++++++++++++++++++++++++++++++++
>>  1 file changed, 32 insertions(+)
>>
>> diff --git a/test/T190-multipart.sh b/test/T190-multipart.sh
>> index 85cbf67..26f7c7a 100755
>> --- a/test/T190-multipart.sh
>> +++ b/test/T190-multipart.sh
>> @@ -104,6 +104,30 @@ Content-Transfer-Encoding: base64
>>  7w0K
>>  --==-=-=--
>>  EOF
>> +
>> +cat <<EOF > content_types
>> +From: Todd <todd@example.com>
>> +To: todd@example.com
>> +Subject: odd content types
>> +Date: Mon, 12 Jan 2014 18:12:32 +0000
>> +User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu)
>> +Message-ID: <KfjfO2WJBw2hrV2p0gjT@example.com>
>> +MIME-Version: 1.0
>> +Content-Type: multipart/alternative; boundary="==-=-=="
>> +
>> +--==-=-==
>> +Content-Type: application/unique_identifier
>> +
>> +<p>This is an embedded message, with a multipart/alternative part.</p>
>> +
>> +--==-=-==
>> +Content-Type: text/some_other_identifier
>> +
>> +This is an embedded message, with a multipart/alternative part.
>> +
>> +--==-=-==--
>> +EOF
>> +cat content_types >> ${MAIL_DIR}/odd_content_type
>>  notmuch new > /dev/null
>>  
>>  test_begin_subtest "--format=text --part=0, full message"
>> @@ -727,4 +751,12 @@ test_begin_subtest "html parts included"
>>  notmuch show --format=json --include-html id:htmlmessage > OUTPUT
>>  test_expect_equal_json "$(cat OUTPUT)" "$(cat EXPECTED.withhtml)"
>>  
>> +test_begin_subtest "indexes mime-type"
>
> test_subtest_known_broken
>
>> +output=$(notmuch search mimetype:application/unique_identifier | notmuch_search_sanitize)
>> +test_expect_equal "$output" "thread:XXX   2014-01-12 [1/1] Todd; odd content types (inbox unread)"
>> +
>
> test_begin_subtest "indexes mime-type #2"
> test_subtest_known_broken
>
> Then you'd remove test_subtest_known_broken when you add the feature.
>
>> +output=$(notmuch search mimetype:text/some_other_identifier | notmuch_search_sanitize)
>> +test_expect_equal "$output" "thread:XXX   2014-01-12 [1/1] Todd; odd content types (inbox unread)"
>
> I think I'd like to see a subtest for searching
> mimetype:multipart/alternative (which should *not* find the message,
> IIUC).

Looking at the code in patch 3, I think it will index that. Please add
the test so we know. ;)

>
> BR,
> Jani.
>
>> +
>> +
>>  test_done
>> -- 
>> 1.9.1
>>
>> _______________________________________________
>> notmuch mailing list
>> notmuch@notmuchmail.org
>> http://notmuchmail.org/mailman/listinfo/notmuch

  reply	other threads:[~2015-01-15 17:18 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-10  0:29 [PATCH] Index Content-Type of attachments with a contenttype prefix Todd
2015-01-10  9:00 ` David Bremner
2015-01-10 14:22   ` Todd
2015-01-10 12:13 ` Jani Nikula
2015-01-10 14:38   ` Todd
2015-01-14  0:00   ` [PATCH v2 0/5] Index the content-type of MIME parts Todd
2015-01-14  0:00   ` [PATCH v2 1/5] Add a failing unit test for indexed mime types Todd
2015-01-15 17:09     ` Jani Nikula
2015-01-15 17:19       ` Jani Nikula [this message]
2015-01-14  0:00   ` [PATCH v2 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature Todd
2015-01-15 17:20     ` Jani Nikula
2015-01-15 18:57       ` Austin Clements
2015-01-14  0:00   ` [PATCH v2 3/5] Add indexing for the mimetype term Todd
2015-01-15 17:16     ` Jani Nikula
2015-01-14  0:00   ` [PATCH v2 4/5] Update completions for Emacs and bash Todd
2015-01-15 17:17     ` Jani Nikula
2015-01-14  0:00   ` [PATCH v2 5/5] Update documentation Todd
2015-01-16  0:30 ` [PATCH v3 1/5] Add failing unit tests for indexed mime types Todd
2015-01-17 10:44   ` David Bremner
2015-01-16  0:30 ` [PATCH v3 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature Todd
2015-01-16  0:30 ` [PATCH v3 3/5] Add indexing for the mimetype term Todd
2015-01-17 15:21   ` David Bremner
2015-01-17 16:41     ` Todd
2015-01-16  0:30 ` [PATCH v3 4/5] Update completions for Emacs and bash Todd
2015-01-16  0:30 ` [PATCH v3 5/5] Update documentation Todd
2015-01-17 15:28   ` David Bremner
2015-01-22 23:43 ` [PATCH v4 0/5] Index the content-type of MIME parts Todd
2015-01-24 15:57   ` David Bremner
2015-01-22 23:43 ` [PATCH v4 1/5] test: Add failing unit tests for indexed mime types Todd
2015-01-22 23:43 ` [PATCH v4 2/5] Add the NOTMUCH_FEATURE_INDEXED_MIMETYPES database feature Todd
2015-01-22 23:43 ` [PATCH v4 3/5] Add indexing for the mimetype term Todd
2015-01-22 23:43 ` [PATCH v4 4/5] Update completions for Emacs and bash Todd
2015-01-22 23:43 ` [PATCH v4 5/5] Update documentation Todd
2015-01-23 19:11   ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tmw9d2v.fsf@nikula.org \
    --to=jani@nikula.org \
    --cc=notmuch@notmuchmail.org \
    --cc=todd@electricoding.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).