]> git.notmuchmail.org Git - notmuch/commitdiff
test-lib: Add dummy subject to force empty subject
authorJesse Rosenthal <jrosenthal@jhu.edu>
Wed, 29 Oct 2014 20:51:44 +0000 (16:51 -0400)
committerDavid Bremner <david@tethera.net>
Sat, 17 Jan 2015 12:49:05 +0000 (13:49 +0100)
At the moment, the test-lib fills in any missing headers. This makes
it impossible to test our handling of empty subjects. This will
allow us to use a special dummy subject -- `@FORCE_EMPTY` -- to force
the subject to remain empty.

test/test-lib.sh

index 53db9caa5f9860ec1cb135032bb7a58f88f2fcce..6057238c7e3cc9f6880efd49e20923cf2d6c0140 100644 (file)
@@ -368,6 +368,8 @@ generate_message ()
        else
            template[subject]="Test message #${gen_msg_cnt}"
        fi
+    elif [ "${template[subject]}" = "@FORCE_EMPTY" ]; then
+       template[subject]=""
     fi
 
     if [ -z "${template[date]}" ]; then