--- /dev/null
+Return-Path: <ethan.glasser.camp@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id DC5CE431FB6\r
+ for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:52:55 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.061\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.061 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_BL_SPAMCOP_NET=1.246,\r
+ RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SORBS_WEB=0.614] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id pay1ur-mReCD for <notmuch@notmuchmail.org>;\r
+ Mon, 25 Jun 2012 13:52:54 -0700 (PDT)\r
+Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com\r
+ [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 352F0431FAF\r
+ for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:52:54 -0700 (PDT)\r
+Received: by wibhm6 with SMTP id hm6so2196032wib.2\r
+ for <notmuch@notmuchmail.org>; Mon, 25 Jun 2012 13:52:51 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+ :mime-version:content-type:content-transfer-encoding;\r
+ bh=Mhw/LYIt+bgFVRXJQ4iuJnciJWZ9Oc/emnbTCdY9KXU=;\r
+ b=gcqO5KMGFNQ8AtWUrjkiSSbSYYHyjgWsixPHm2jqxy49LEw247/QauAKPrNtEiFLQS\r
+ xK4ktraR3lXZkaCztKJ+8dMZkQ7FjAqwLvACzX0Tx4AW6WZniFYr488YtkZ7S1C9TTEF\r
+ aGyVCLPZMpwyO/iq8rCs64BulYgEw2d5NFFuiM9lG1ulWZkf9yU/ai9GImX5mLHtZkco\r
+ 8GnTGy5khcNC14+yapVpkvizK5QjtqauzGDcwyFBqWVZrBGQd2/ocoYGk1aF3Ae8gT9X\r
+ /q1FgdabILyCB6FRzzyVGQoiVoydTtETAnF1s28puSd/g+GzwQ1JHNFdXatTCVeQi47G\r
+ imYQ==\r
+Received: by 10.180.14.165 with SMTP id q5mr27186173wic.8.1340657571500;\r
+ Mon, 25 Jun 2012 13:52:51 -0700 (PDT)\r
+Received: from localhost ([195.24.209.21])\r
+ by mx.google.com with ESMTPS id eu4sm38226wib.2.2012.06.25.13.52.46\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Mon, 25 Jun 2012 13:52:50 -0700 (PDT)\r
+From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH 07/14] Update tests that need to see filenames to use URIs\r
+Date: Mon, 25 Jun 2012 16:51:50 -0400\r
+Message-Id: <1340657517-6539-3-git-send-email-ethan@betacantrips.com>\r
+X-Mailer: git-send-email 1.7.9.5\r
+In-Reply-To: <1340657517-6539-1-git-send-email-ethan@betacantrips.com>\r
+References: <1340657517-6539-1-git-send-email-ethan@betacantrips.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+X-Mailman-Approved-At: Tue, 26 Jun 2012 03:51:54 -0700\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 25 Jun 2012 20:52:56 -0000\r
+\r
+This fixes all tests except atomicity, which should be next.\r
+\r
+Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>\r
+---\r
+ test/emacs | 2 +-\r
+ test/json | 4 ++--\r
+ test/maildir-sync | 7 ++++---\r
+ test/multipart | 4 ++--\r
+ test/new | 6 +++---\r
+ test/search-folder-coherence | 2 +-\r
+ test/search-output | 4 ++--\r
+ test/test-lib.sh | 3 +++\r
+ 8 files changed, 18 insertions(+), 14 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index e9f954c..c08791e 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -621,7 +621,7 @@ Stash my stashables\r
+ id:"bought"\r
+ bought\r
+ inbox,stashtest\r
+-${gen_msg_filename}\r
++${gen_msg_uri}\r
+ http://mid.gmane.org/bought\r
+ http://marc.info/?i=bought\r
+ http://mail-archive.com/search?l=mid&q=bought\r
+diff --git a/test/json b/test/json\r
+index 6439788..be29fac 100755\r
+--- a/test/json\r
++++ b/test/json\r
+@@ -5,7 +5,7 @@ test_description="--format=json output"\r
+ test_begin_subtest "Show message: json"\r
+ add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-show-message\""\r
+ output=$(notmuch show --format=json "json-show-message")\r
+-test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"\r
++test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_uri}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"\r
+ \r
+ test_begin_subtest "Search message: json"\r
+ add_message "[subject]=\"json-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-search-message\""\r
+@@ -22,7 +22,7 @@ test_expect_equal "$output" "[{\"thread\": \"XXX\",\r
+ test_begin_subtest "Show message: json, utf-8"\r
+ add_message "[subject]=\"json-show-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-show-méssage\""\r
+ output=$(notmuch show --format=json "jsön-show-méssage")\r
+-test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-utf8-body-sübjéct\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]"\r
++test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_uri}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-utf8-body-sübjéct\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]"\r
+ \r
+ test_begin_subtest "Show message: json, inline attachment filename"\r
+ subject='json-show-inline-attachment-filename'\r
+diff --git a/test/maildir-sync b/test/maildir-sync\r
+index 01348d3..a2e110e 100755\r
+--- a/test/maildir-sync\r
++++ b/test/maildir-sync\r
+@@ -8,7 +8,7 @@ test_description="maildir synchronization"\r
+ # --format=json" output includes some newlines. Also, need to avoid\r
+ # including the local value of MAIL_DIR in the result.\r
+ filter_show_json() {\r
+- sed -e 's/, /,\n/g' | sed -e "s|${MAIL_DIR}/|MAIL_DIR/|"\r
++ sed -e 's/, /,\n/g' | sed -e "s|${MAIL_URI}/|MAIL_DIR/|"\r
+ echo\r
+ }\r
+ \r
+@@ -102,8 +102,9 @@ No new mail. Detected 1 file rename.\r
+ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Removing S flag (inbox unread)"\r
+ \r
+ test_begin_subtest "Removing info from filename leaves tags unchanged"\r
+-add_message [subject]='"Message to lose maildir info"' [filename]='message-to-lose-maildir-info' [dir]=cur\r
+-notmuch tag -unread subject:"Message to lose maildir info"\r
++generate_message [subject]='"Message to lose maildir info"' [filename]='message-to-lose-maildir-info' [dir]=cur\r
++notmuch new > hrngh.new\r
++notmuch tag -unread subject:"Message to lose maildir info" > hrngh.tag\r
+ mv "$MAIL_DIR/cur/message-to-lose-maildir-info:2,S" "$MAIL_DIR/cur/message-without-maildir-info"\r
+ output=$(NOTMUCH_NEW)\r
+ output+="\r
+diff --git a/test/multipart b/test/multipart\r
+index 72d3927..ccf410b 100755\r
+--- a/test/multipart\r
++++ b/test/multipart\r
+@@ -109,7 +109,7 @@ notmuch new > /dev/null\r
+ test_begin_subtest "--format=text --part=0, full message"\r
+ notmuch show --format=text --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+-\f\r
+message{ id:87liy5ap00.fsf@yoom.home.cworth.org depth:0 match:1 excluded:0 filename:${MAIL_DIR}/multipart\r
++\f\r
+message{ id:87liy5ap00.fsf@yoom.home.cworth.org depth:0 match:1 excluded:0 filename:${MAIL_URI}/multipart\r
+ \f\r
+header{\r
+ Carl Worth <cworth@cworth.org> (2001-01-05) (attachment inbox signed unread)\r
+ Subject: Multipart message\r
+@@ -323,7 +323,7 @@ notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' | s\r
+ echo >>OUTPUT # expect *no* newline at end of output\r
+ cat <<EOF >EXPECTED\r
+ \r
+-{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "excluded": false, "filename": "${MAIL_DIR}/multipart", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [\r
++{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "excluded": false, "filename": "${MAIL_URI}/multipart", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [\r
+ {"id": 1, "content-type": "multipart/signed", "content": [\r
+ {"id": 2, "content-type": "multipart/mixed", "content": [\r
+ {"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"Subject": "html message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [\r
+diff --git a/test/new b/test/new\r
+index cab7c01..e7852ec 100755\r
+--- a/test/new\r
++++ b/test/new\r
+@@ -171,9 +171,9 @@ touch "${MAIL_DIR}"/ignored_file\r
+ touch "${MAIL_DIR}"/.ignored_hidden_file\r
+ output=$(NOTMUCH_NEW 2>&1)\r
+ test_expect_equal "$output" \\r
+-"Note: Ignoring non-mail file: ${MAIL_DIR}/.git/config\r
+-Note: Ignoring non-mail file: ${MAIL_DIR}/.ignored_hidden_file\r
+-Note: Ignoring non-mail file: ${MAIL_DIR}/ignored_file\r
++"Note: Ignoring non-mail file: ${MAIL_URI}/.git/config\r
++Note: Ignoring non-mail file: ${MAIL_URI}/.ignored_hidden_file\r
++Note: Ignoring non-mail file: ${MAIL_URI}/ignored_file\r
+ Added 1 new message to the database."\r
+ \r
+ test_begin_subtest "Ignore files and directories specified in new.ignore"\r
+diff --git a/test/search-folder-coherence b/test/search-folder-coherence\r
+index 3f6ec76..08558db 100755\r
+--- a/test/search-folder-coherence\r
++++ b/test/search-folder-coherence\r
+@@ -27,7 +27,7 @@ cat <<EOF >EXPECTED\r
+ MAIL_DIR/msg-001\r
+ MAIL_DIR/spam/msg-001\r
+ EOF\r
+-notmuch search --output=files id:$id_x | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT\r
++notmuch search --output=files id:$id_x | sed -e "s,$MAIL_URI,MAIL_DIR," >OUTPUT\r
+ test_expect_equal_file OUTPUT EXPECTED\r
+ \r
+ test_begin_subtest "Test matches folder:spam"\r
+diff --git a/test/search-output b/test/search-output\r
+index 8b57a43..d038dc7 100755\r
+--- a/test/search-output\r
++++ b/test/search-output\r
+@@ -181,7 +181,7 @@ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
+ \r
+ test_begin_subtest "--output=files"\r
+-notmuch search --output=files '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT\r
++notmuch search --output=files '*' | sed -e "s,$MAIL_URI,MAIL_DIR," >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+ MAIL_DIR/cur/52:2,\r
+ MAIL_DIR/cur/53:2,\r
+@@ -240,7 +240,7 @@ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
+ \r
+ test_begin_subtest "--output=files --format=json"\r
+-notmuch search --format=json --output=files '*' | sed -e "s,$MAIL_DIR,MAIL_DIR," >OUTPUT\r
++notmuch search --format=json --output=files '*' | sed -e "s,$MAIL_URI,MAIL_DIR," >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+ ["MAIL_DIR/cur/52:2,",\r
+ "MAIL_DIR/cur/53:2,",\r
+diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+index 06aaea2..195158c 100644\r
+--- a/test/test-lib.sh\r
++++ b/test/test-lib.sh\r
+@@ -287,6 +287,7 @@ generate_message ()\r
+ \r
+ gen_msg_cnt=$((gen_msg_cnt + 1))\r
+ if [ -z "${template[filename]}" ]; then\r
++\r
+ gen_msg_name="msg-$(printf "%03d" $gen_msg_cnt)"\r
+ else\r
+ gen_msg_name=${template[filename]}\r
+@@ -304,6 +305,7 @@ generate_message ()\r
+ gen_msg_filename="${MAIL_DIR}/${template[dir]}/$gen_msg_name"\r
+ mkdir -p "$(dirname "$gen_msg_filename")"\r
+ fi\r
++ gen_msg_uri=maildir://$gen_msg_filename\r
+ \r
+ if [ -z "${template[body]}" ]; then\r
+ template[body]="This is just a test message (#${gen_msg_cnt})"\r
+@@ -1149,6 +1151,7 @@ export HOME="${TMP_DIRECTORY}/home"\r
+ mkdir -p "${HOME}"\r
+ \r
+ MAIL_DIR="${TMP_DIRECTORY}/mail"\r
++MAIL_URI=maildir://$MAIL_DIR\r
+ export GNUPGHOME="${TMP_DIRECTORY}/gnupg"\r
+ export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config"\r
+ \r
+-- \r
+1.7.9.5\r
+\r