#!/bin/bash test_description="Test maildir mailstore" . ./test-lib.sh filter_output() { grep -v -E -e "$NOTMUCH_IGNORED_OUTPUT_REGEXP" | sed -e "$NOTMUCH_THREAD_ID_SQUELCH" } filter_show() { sed -e 's/, /,\n/g'|sed -e "s|${MAIL_DIR}/||" -e '/^"tags"/d' echo } cat >> "$NOTMUCH_CONFIG" < expected < actual && test_cmp expected actual #emacs --eval "(gdb \"gdb --annotate=3 --args $(which notmuch) new\")" ' cat > expected < actual && test_cmp expected actual ' cat > expected < actual && test_cmp expected actual ' cat > expected < actual && test_cmp expected actual ' cat > expected < actual && test_cmp expected actual ' cat > expected < actual && test_cmp expected actual ' test_expect_success 'Tag the seen messages as replied' ' notmuch tag +replied -inbox tag:inbox and not tag:unread ' cat > expected < actual && test_cmp expected actual ' cat < show-expected [[[{"id": "msg-001@notmuch-test-suite", "match": true, "filename": "msg-001:2,RS", "headers": {"Subject": "test message", "From": "Notmuch Test Suite ", "To": "Notmuch Test Suite ", "Cc": "", "Bcc": "", "Date": "Sat, 01 Jan 2000 12:00:00 -0000"}, "body": [{"id": 1, "content-type": "text/plain", "content": "This is just a test message at msg-001:2,\n"}]}, []]]] EOF test_expect_success 'Renamed message can be shown without running notmuch new' ' notmuch show --format=json id:msg-001@notmuch-test-suite | filter_show > show-actual && test_cmp show-expected show-actual ' test_expect_success 'Test that we can reply to the renamed message' ' notmuch reply id:msg-001@notmuch-test-suite ' echo "No new mail." > expected test_expect_success 'No rename should be detected by notmuch new' ' increment_mtime "$(dirname "${gen_msg_filename}")" && notmuch new > actual && test_cmp expected actual ' test_expect_success "Add a message to new/ without info" ' generate_message [subject]="\"test message 3\"" [date]="\"Sat, 01 Jan 2000 12:00:00 -0000\"" [dir]=new && notmuch new | filter_output > actual && test_cmp - actual < actual && test_cmp - actual < actual && test_cmp - actual < actual && test_cmp - actual < actual && test_cmp - actual < actual && test_cmp - actual < actual test_cmp - actual < actual && test_cmp - actual < actual && test_cmp - actual < actual && test_cmp - actual < actual && test_cmp - actual <