mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 11:58:10 +01:00
test: use $(dirname "$0") for sourcing test-lib.sh
Don't assume the tests are always run from within the source tree.
This commit is contained in:
parent
0dd58ea7e7
commit
a863de1e43
77 changed files with 77 additions and 77 deletions
|
@ -14,7 +14,7 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# Test harness
|
# Test harness
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description="online help"
|
test_description="online help"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest 'notmuch --help'
|
test_begin_subtest 'notmuch --help'
|
||||||
test_expect_success 'notmuch --help'
|
test_expect_success 'notmuch --help'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch compact"'
|
test_description='"notmuch compact"'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_message '[subject]=One'
|
add_message '[subject]=One'
|
||||||
add_message '[subject]=Two'
|
add_message '[subject]=Two'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description='"notmuch config"'
|
test_description='"notmuch config"'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Get string value"
|
test_begin_subtest "Get string value"
|
||||||
test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite"
|
test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description='"notmuch setup"'
|
test_description='"notmuch setup"'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Notmuch new without a config suggests notmuch setup"
|
test_begin_subtest "Notmuch new without a config suggests notmuch setup"
|
||||||
output=$(notmuch --config=new-notmuch-config new 2>&1)
|
output=$(notmuch --config=new-notmuch-config new 2>&1)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch new" in several variations'
|
test_description='"notmuch new" in several variations'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "No new messages"
|
test_begin_subtest "No new messages"
|
||||||
output=$(NOTMUCH_NEW --debug)
|
output=$(NOTMUCH_NEW --debug)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch count" for messages and threads'
|
test_description='"notmuch count" for messages and threads'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch insert"'
|
test_description='"notmuch insert"'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_require_external_prereq gdb
|
test_require_external_prereq gdb
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch search" in several variations'
|
test_description='"notmuch search" in several variations'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='various settings for "notmuch search --output="'
|
test_description='various settings for "notmuch search --output="'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch address" in several variants'
|
test_description='"notmuch address" in several variants'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch search" by folder: and path: (with variations)'
|
test_description='"notmuch search" by folder: and path: (with variations)'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_message '[dir]=bad' '[subject]="To the bone"'
|
add_message '[dir]=bad' '[subject]="To the bone"'
|
||||||
add_message '[dir]=.' '[subject]="Top level"'
|
add_message '[dir]=.' '[subject]="Top level"'
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# id:3wd4o8wa7fx.fsf@testarossa.amd.com
|
# id:3wd4o8wa7fx.fsf@testarossa.amd.com
|
||||||
|
|
||||||
test_description='that notmuch does not overlap term positions'
|
test_description='that notmuch does not overlap term positions'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_message '[to]="a@b.c, x@y.z"'
|
add_message '[to]="a@b.c, x@y.z"'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='messages with unquoted . in name'
|
test_description='messages with unquoted . in name'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_message \
|
add_message \
|
||||||
'[from]="Some.Name for Someone <bugs@quoting.com>"' \
|
'[from]="Some.Name for Someone <bugs@quoting.com>"' \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch search" --offset and --limit parameters'
|
test_description='"notmuch search" --offset and --limit parameters'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch search, count and show" with excludes in several variations'
|
test_description='"notmuch search, count and show" with excludes in several variations'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
# Generates a thread consisting of a top level message and 'length'
|
# Generates a thread consisting of a top level message and 'length'
|
||||||
# replies. The subject of the top message 'subject: top message"
|
# replies. The subject of the top message 'subject: top message"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch tag"'
|
test_description='"notmuch tag"'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_message '[subject]=One'
|
add_message '[subject]=One'
|
||||||
add_message '[subject]=Two'
|
add_message '[subject]=Two'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="--format=json output"
|
test_description="--format=json output"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Show message: json"
|
test_begin_subtest "Show message: json"
|
||||||
add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[bcc]=\"test_suite+bcc@notmuchmail.org\"" "[reply-to]=\"test_suite+replyto@notmuchmail.org\"" "[body]=\"json-show-message\""
|
add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[bcc]=\"test_suite+bcc@notmuchmail.org\"" "[reply-to]=\"test_suite+replyto@notmuchmail.org\"" "[body]=\"json-show-message\""
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="--format=sexp output"
|
test_description="--format=sexp output"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Show message: sexp"
|
test_begin_subtest "Show message: sexp"
|
||||||
add_message "[subject]=\"sexp-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[bcc]=\"test_suite+bcc@notmuchmail.org\"" "[reply-to]=\"test_suite+replyto@notmuchmail.org\"" "[body]=\"sexp-show-message\""
|
add_message "[subject]=\"sexp-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[bcc]=\"test_suite+bcc@notmuchmail.org\"" "[reply-to]=\"test_suite+replyto@notmuchmail.org\"" "[body]=\"sexp-show-message\""
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="--format=text output"
|
test_description="--format=text output"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Show message: text"
|
test_begin_subtest "Show message: text"
|
||||||
add_message "[subject]=\"text-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"text-show-message\""
|
add_message "[subject]=\"text-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"text-show-message\""
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="output of multipart message"
|
test_description="output of multipart message"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
cat <<EOF > embedded_message_body
|
cat <<EOF > embedded_message_body
|
||||||
Content-Type: multipart/alternative; boundary="==-=-=="
|
Content-Type: multipart/alternative; boundary="==-=-=="
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="naming of threads with changing subject"
|
test_description="naming of threads with changing subject"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Initial thread name (oldest-first search)"
|
test_begin_subtest "Initial thread name (oldest-first search)"
|
||||||
add_message '[subject]="thread-naming: Initial thread subject"' \
|
add_message '[subject]="thread-naming: Initial thread subject"' \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="naming of authors with unusual addresses"
|
test_description="naming of authors with unusual addresses"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Add author with empty quoted real name"
|
test_begin_subtest "Add author with empty quoted real name"
|
||||||
add_message '[subject]="author-naming: Initial thread subject"' \
|
add_message '[subject]="author-naming: Initial thread subject"' \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description='notmuch show --format=raw'
|
test_description='notmuch show --format=raw'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_message
|
add_message
|
||||||
add_message
|
add_message
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="\"notmuch reply\" in several variations"
|
test_description="\"notmuch reply\" in several variations"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Basic reply"
|
test_begin_subtest "Basic reply"
|
||||||
add_message '[from]="Sender <sender@example.com>"' \
|
add_message '[from]="Sender <sender@example.com>"' \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="\"notmuch reply --reply-to=sender\" in several variations"
|
test_description="\"notmuch reply --reply-to=sender\" in several variations"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Basic reply-to-sender"
|
test_begin_subtest "Basic reply-to-sender"
|
||||||
add_message '[from]="Sender <sender@example.com>"' \
|
add_message '[from]="Sender <sender@example.com>"' \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="\"notmuch dump\" and \"notmuch restore\""
|
test_description="\"notmuch dump\" and \"notmuch restore\""
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
NOTMUCH_NEW > /dev/null
|
NOTMUCH_NEW > /dev/null
|
||||||
test_begin_subtest "dump header"
|
test_begin_subtest "dump header"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="handling of uuencoded data"
|
test_description="handling of uuencoded data"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_message [subject]=uuencodetest '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
|
add_message [subject]=uuencodetest '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \
|
||||||
'[body]="This message is used to ensure that notmuch correctly handles a
|
'[body]="This message is used to ensure that notmuch correctly handles a
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="threading when messages received out of order"
|
test_description="threading when messages received out of order"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
# Generate all single-root four message thread structures. We'll use
|
# Generate all single-root four message thread structures. We'll use
|
||||||
# this for multiple tests below.
|
# this for multiple tests below.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="author reordering;"
|
test_description="author reordering;"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Adding parent message"
|
test_begin_subtest "Adding parent message"
|
||||||
generate_message [body]=findme [id]=new-parent-id [subject]=author-reorder-threadtest '[from]="User <user@example.com>"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
|
generate_message [body]=findme [id]=new-parent-id [subject]=author-reorder-threadtest '[from]="User <user@example.com>"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="From line heuristics (with multiple configured addresses)"
|
test_description="From line heuristics (with multiple configured addresses)"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Magic from guessing (nothing to go on)"
|
test_begin_subtest "Magic from guessing (nothing to go on)"
|
||||||
add_message '[from]="Sender <sender@example.com>"' \
|
add_message '[from]="Sender <sender@example.com>"' \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="messages with ridiculously-long message IDs"
|
test_description="messages with ridiculously-long message IDs"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Referencing long ID before adding"
|
test_begin_subtest "Referencing long ID before adding"
|
||||||
generate_message '[subject]="Reference of ridiculously-long message ID"' \
|
generate_message '[subject]="Reference of ridiculously-long message ID"' \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="encoding issues"
|
test_description="encoding issues"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Message with text of unknown charset"
|
test_begin_subtest "Message with text of unknown charset"
|
||||||
add_message '[content-type]="text/plain; charset=unknown-8bit"' \
|
add_message '[content-type]="text/plain; charset=unknown-8bit"' \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description="emacs interface"
|
test_description="emacs interface"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
EXPECTED=$TEST_DIRECTORY/emacs.expected-output
|
EXPECTED=$TEST_DIRECTORY/emacs.expected-output
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="Emacs with large search results buffer"
|
test_description="Emacs with large search results buffer"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
x=xxxxxxxxxx # 10
|
x=xxxxxxxxxx # 10
|
||||||
x=$x$x$x$x$x$x$x$x$x$x # 100
|
x=$x$x$x$x$x$x$x$x$x$x # 100
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description="emacs: mail subject to filename"
|
test_description="emacs: mail subject to filename"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
# emacs server can't be started in a child process with $(test_emacs ...)
|
# emacs server can't be started in a child process with $(test_emacs ...)
|
||||||
test_emacs '(ignore)' > /dev/null
|
test_emacs '(ignore)' > /dev/null
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
test_description="maildir synchronization"
|
test_description="maildir synchronization"
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
# Create the expected maildir structure
|
# Create the expected maildir structure
|
||||||
mkdir $MAIL_DIR/cur
|
mkdir $MAIL_DIR/cur
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# - verification of signatures from expired/revoked keys
|
# - verification of signatures from expired/revoked keys
|
||||||
|
|
||||||
test_description='PGP/MIME signature verification and decryption'
|
test_description='PGP/MIME signature verification and decryption'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description='S/MIME signature verification and decryption'
|
test_description='S/MIME signature verification and decryption'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_gpgsm_home ()
|
add_gpgsm_home ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
test_description='exception symbol hiding'
|
test_description='exception symbol hiding'
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest 'running test' run_test
|
test_begin_subtest 'running test' run_test
|
||||||
mkdir -p ${PWD}/fakedb/.notmuch
|
mkdir -p ${PWD}/fakedb/.notmuch
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='folder tags removed and added through file renames remain consistent'
|
test_description='folder tags removed and added through file renames remain consistent'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "No new messages"
|
test_begin_subtest "No new messages"
|
||||||
output=$(NOTMUCH_NEW)
|
output=$(NOTMUCH_NEW)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='atomicity'
|
test_description='atomicity'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
# This script tests the effects of killing and restarting "notmuch
|
# This script tests the effects of killing and restarting "notmuch
|
||||||
# new" at arbitrary points. If notmuch new is properly atomic, the
|
# new" at arbitrary points. If notmuch new is properly atomic, the
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="python bindings"
|
test_description="python bindings"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_require_external_prereq ${NOTMUCH_PYTHON}
|
test_require_external_prereq ${NOTMUCH_PYTHON}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="ruby bindings"
|
test_description="ruby bindings"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
if [ "${NOTMUCH_HAVE_RUBY_DEV}" = "0" ]; then
|
if [ "${NOTMUCH_HAVE_RUBY_DEV}" = "0" ]; then
|
||||||
test_subtest_missing_external_prereq_["ruby development files"]=t
|
test_subtest_missing_external_prereq_["ruby development files"]=t
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='hooks'
|
test_description='hooks'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
HOOK_DIR=${MAIL_DIR}/.notmuch/hooks
|
HOOK_DIR=${MAIL_DIR}/.notmuch/hooks
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="argument parsing"
|
test_description="argument parsing"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "sanity check"
|
test_begin_subtest "sanity check"
|
||||||
$TEST_DIRECTORY/arg-test pos1 --keyword=one --boolean --string=foo pos2 --int=7 --flag=one --flag=three > OUTPUT
|
$TEST_DIRECTORY/arg-test pos1 --keyword=one --boolean --string=foo pos2 --int=7 --flag=one --flag=three > OUTPUT
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description="emacs test function sanity"
|
test_description="emacs test function sanity"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "emacs test function sanity"
|
test_begin_subtest "emacs test function sanity"
|
||||||
test_emacs_expect_t 't'
|
test_emacs_expect_t 't'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description="emacs address cleaning"
|
test_description="emacs address cleaning"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "notmuch-test-address-clean part 1"
|
test_begin_subtest "notmuch-test-address-clean part 1"
|
||||||
test_emacs_expect_t '(notmuch-test-address-cleaning-1)'
|
test_emacs_expect_t '(notmuch-test-address-cleaning-1)'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description="emacs notmuch-hello view"
|
test_description="emacs notmuch-hello view"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
EXPECTED=$TEST_DIRECTORY/emacs.expected-output
|
EXPECTED=$TEST_DIRECTORY/emacs.expected-output
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description="emacs notmuch-show view"
|
test_description="emacs notmuch-show view"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
EXPECTED=$TEST_DIRECTORY/emacs-show.expected-output
|
EXPECTED=$TEST_DIRECTORY/emacs-show.expected-output
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description="emacs notmuch-show charset handling"
|
test_description="emacs notmuch-show charset handling"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
|
|
||||||
UTF8_YEN=$'\xef\xbf\xa5'
|
UTF8_YEN=$'\xef\xbf\xa5'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description="emacs tree view interface"
|
test_description="emacs tree view interface"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
EXPECTED=$TEST_DIRECTORY/tree.expected-output
|
EXPECTED=$TEST_DIRECTORY/tree.expected-output
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='messages with missing headers'
|
test_description='messages with missing headers'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
# Notmuch requires at least one of from, subject, or to or it will
|
# Notmuch requires at least one of from, subject, or to or it will
|
||||||
# ignore the file. Generate two messages so that together they cover
|
# ignore the file. Generate two messages so that together they cover
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="hex encoding and decoding"
|
test_description="hex encoding and decoding"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "round trip"
|
test_begin_subtest "round trip"
|
||||||
find $TEST_DIRECTORY/corpora/default -type f -print | sort | xargs cat > EXPECTED
|
find $TEST_DIRECTORY/corpora/default -type f -print | sort | xargs cat > EXPECTED
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="date/time parser module"
|
test_description="date/time parser module"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
# Sanity/smoke tests for the date/time parser independent of notmuch
|
# Sanity/smoke tests for the date/time parser independent of notmuch
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="date:since..until queries"
|
test_description="date:since..until queries"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ test_description='test of proper handling of in-reply-to and references headers'
|
||||||
# database is constructed properly, even in the presence of
|
# database is constructed properly, even in the presence of
|
||||||
# non-RFC-compliant headers'
|
# non-RFC-compliant headers'
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "Use References when In-Reply-To is broken"
|
test_begin_subtest "Use References when In-Reply-To is broken"
|
||||||
add_message '[id]="foo@one.com"' \
|
add_message '[id]="foo@one.com"' \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='"notmuch show"'
|
test_description='"notmuch show"'
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="database upgrade"
|
test_description="database upgrade"
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
dbtarball=database-v1.tar.xz
|
dbtarball=database-v1.tar.xz
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="database version and feature compatibility"
|
test_description="database version and feature compatibility"
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest "future database versions abort open"
|
test_begin_subtest "future database versions abort open"
|
||||||
${TEST_DIRECTORY}/make-db-version ${MAIL_DIR} 9999 ""
|
${TEST_DIRECTORY}/make-db-version ${MAIL_DIR} 9999 ""
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="error reporting for library"
|
test_description="error reporting for library"
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="database revision tracking"
|
test_description="database revision tracking"
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
test_description='test of searching by thread-id'
|
test_description='test of searching by thread-id'
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="library config API"
|
test_description="library config API"
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ test_description='thread breakage during reindexing'
|
||||||
# works properly and attempted fixes to threading issues do not break
|
# works properly and attempted fixes to threading issues do not break
|
||||||
# the expected contents of the index.
|
# the expected contents of the index.
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
message_a() {
|
message_a() {
|
||||||
mkdir -p ${MAIL_DIR}/cur
|
mkdir -p ${MAIL_DIR}/cur
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='named queries'
|
test_description='named queries'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
QUERYSTR="date:2009-11-18..2009-11-18 and tag:unread"
|
QUERYSTR="date:2009-11-18..2009-11-18 and tag:unread"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="message property API"
|
test_description="message property API"
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="locking"
|
test_description="locking"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
if [ "${NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK}" = "0" ]; then
|
if [ "${NOTMUCH_HAVE_XAPIAN_DB_RETRY_LOCK}" = "0" ]; then
|
||||||
test_subtest_missing_external_prereq_["lock retry support"]=t
|
test_subtest_missing_external_prereq_["lock retry support"]=t
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="Emacs Draft Handling"
|
test_description="Emacs Draft Handling"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="DatabaseModifiedError handling"
|
test_description="DatabaseModifiedError handling"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
# add enough messages to trigger the exception
|
# add enough messages to trigger the exception
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='regular expression searches'
|
test_description='regular expression searches'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 0 ]; then
|
if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 0 ]; then
|
||||||
test_done
|
test_done
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="parsing of bad dates"
|
test_description="parsing of bad dates"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_message [date]='"()"'
|
add_message [date]='"()"'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="duplicate message ids"
|
test_description="duplicate message ids"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_message '[id]="duplicate"' '[subject]="message 1" [filename]=copy1'
|
add_message '[id]="duplicate"' '[subject]="message 1" [filename]=copy1'
|
||||||
add_message '[id]="duplicate"' '[subject]="message 2" [filename]=copy2'
|
add_message '[id]="duplicate"' '[subject]="message 2" [filename]=copy2'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description="indexing of html parts"
|
test_description="indexing of html parts"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus html
|
add_email_corpus html
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
test_description="command line arguments"
|
test_description="command line arguments"
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_message
|
add_message
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
test_description='reindexing messages'
|
test_description='reindexing messages'
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
add_email_corpus
|
add_email_corpus
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
test_description='the verbosity options of the test framework itself.'
|
test_description='the verbosity options of the test framework itself.'
|
||||||
|
|
||||||
. ./test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
test_begin_subtest 'print something in test_expect_success and pass'
|
test_begin_subtest 'print something in test_expect_success and pass'
|
||||||
test_expect_success '
|
test_expect_success '
|
||||||
|
|
Loading…
Reference in a new issue