X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT050-new.sh;h=2985e24c66beb9ce13816ebdacf85c5a9638e139;hb=2dbc5fdf5a3c40b3e44dcde7d8caffe7dbbd217f;hp=882939fabc4264e73b946713d20a37eb9a743b65;hpb=4c79a2dabe38ac72eb9eb21620f2ffca5f1885c6;p=notmuch diff --git a/test/T050-new.sh b/test/T050-new.sh index 882939fa..2985e24c 100755 --- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -339,11 +339,25 @@ test_expect_code 1 "NOTMUCH_NEW --debug 2>&1" notmuch config set new.tags $OLDCONFIG +test_begin_subtest "Long directory names don't cause rescan" +test_subtest_known_broken +printf -v name 'z%.0s' {1..234} +generate_message [dir]=$name +NOTMUCH_NEW > OUTPUT +notmuch new >> OUTPUT +rm -r ${MAIL_DIR}/${name} +notmuch new >> OUTPUT +cat < EXPECTED +Added 1 new message to the database. +No new mail. +No new mail. Removed 1 message. +EOF +test_expect_equal_file EXPECTED OUTPUT test_begin_subtest "Xapian exception: read only files" -chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.* +chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.* output=$(NOTMUCH_NEW --debug 2>&1 | sed 's/: .*$//' ) -chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.* +chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.* test_expect_equal "$output" "A Xapian exception occurred opening database" @@ -385,8 +399,8 @@ test_begin_subtest "reference loop does not crash" test_expect_code 0 "notmuch show --format=json id:mid-loop-12@example.org id:mid-loop-21@example.org > OUTPUT" test_begin_subtest "reference loop ordered by date" -threadid=$(notmuch search --output=threads id:mid-loop-12@example.org) -notmuch show --format=mbox $threadid | grep '^Date' > OUTPUT +threadid=$(notmuch search --output=threads id:mid-loop-12@example.org) +notmuch show --format=mbox $threadid | grep '^Date' > OUTPUT cat < EXPECTED Date: Thu, 16 Jun 2016 22:14:41 -0400 Date: Fri, 17 Jun 2016 22:14:41 -0400