]> git.notmuchmail.org Git - notmuch/commitdiff
test: test one character long directory names at top level
authorJani Nikula <jani@nikula.org>
Sun, 10 Apr 2016 19:43:21 +0000 (22:43 +0300)
committerDavid Bremner <david@tethera.net>
Tue, 12 Apr 2016 23:37:08 +0000 (20:37 -0300)
Yes, it's broken. Reported by h01ger on IRC.

test/T050-new.sh

index f38e626354f2b573e448c3c5af1c4ff5d4a751a2..a99fb5b746067eed4b32ccebe7325029fe73b702 100755 (executable)
@@ -169,6 +169,20 @@ output=$(NOTMUCH_NEW --debug)
 test_expect_equal "$output" "(D) add_files, pass 3: queuing leftover directory ${MAIL_DIR}/two for deletion from database
 No new mail. Removed 3 messages."
 
+test_begin_subtest "One character directory at top level"
+test_subtest_known_broken
+
+generate_message [dir]=A
+generate_message [dir]=A/B
+generate_message [dir]=A/B/C
+
+output=$(NOTMUCH_NEW --debug)
+test_expect_equal "$output" "Added 3 new messages to the database."
+
+# clean up after the broken test to not mess up other tests
+rm -rf "${MAIL_DIR}"/A
+NOTMUCH_NEW 2>&1 > /dev/null
+
 test_begin_subtest "Support single-message mbox"
 cat > "${MAIL_DIR}"/mbox_file1 <<EOF
 From test_suite@notmuchmail.org Fri Jan  5 15:43:57 2001