]> git.notmuchmail.org Git - notmuch/commitdiff
test: Remove test-message filenames from generated messages
authorCarl Worth <cworth@cworth.org>
Thu, 15 Apr 2010 21:01:54 +0000 (14:01 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 15 Apr 2010 21:13:12 +0000 (14:13 -0700)
The filenames aren't predictable (including the current directory) nor
stable from one run to the next (including the PID). This makes it
hard to predict the output from a search command that returns such a
message (such as "*").

The original goal was simply to ensure that each generated message was
distinguishable somehow. So just use the message counter instead.

test/notmuch-test

index e74e6e134b83f0f71b1b1544bb5a2fb6e512b6a6..74509bcf28450a45202eba866b4305d5145d4cc2 100755 (executable)
@@ -94,7 +94,7 @@ generate_message ()
     fi
 
     if [ -z "${template[body]}" ]; then
     fi
 
     if [ -z "${template[body]}" ]; then
-       template[body]="This is just a test message at ${gen_msg_filename}"
+       template[body]="This is just test message (#${gen_msg_cnt})"
     fi
 
     if [ -z "${template[from]}" ]; then
     fi
 
     if [ -z "${template[from]}" ]; then
@@ -106,7 +106,7 @@ generate_message ()
     fi
 
     if [ -z "${template[subject]}" ]; then
     fi
 
     if [ -z "${template[subject]}" ]; then
-       template[subject]="Test message ${gen_msg_filename}"
+       template[subject]="Test message #${gen_msg_cnt}"
     fi
 
     if [ -z "${template[date]}" ]; then
     fi
 
     if [ -z "${template[date]}" ]; then