test: Fix missing erase-buffer in emacs test
authorAustin Clements <amdragon@MIT.EDU>
Thu, 24 Oct 2013 15:19:04 +0000 (11:19 -0400)
committerDavid Bremner <david@tethera.net>
Sat, 9 Nov 2013 00:18:24 +0000 (20:18 -0400)
The first subprocess error exit code test assumed the *Notmuch errors*
buffer would be empty.  Rather than assuming, make it so.

test/emacs

index 5bc3efcc6a87dc65b19031d489a804cc52b5fa2e..05295af8afc3f2e90887cb1a4ce85581f0a0a382 100755 (executable)
@@ -864,6 +864,8 @@ EOF
 chmod a+x notmuch_fail
 test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\"))
               (with-current-buffer \"*Messages*\" (erase-buffer))
+              (with-current-buffer (get-buffer-create \"*Notmuch errors*\")
+                 (erase-buffer))
               (notmuch-search \"tag:inbox\")
               (notmuch-test-wait)
               (with-current-buffer \"*Messages*\"
@@ -893,7 +895,8 @@ EOF
 chmod a+x notmuch_fail
 test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\"))
               (with-current-buffer \"*Messages*\" (erase-buffer))
-              (with-current-buffer \"*Notmuch errors*\" (erase-buffer))
+              (with-current-buffer (get-buffer-create \"*Notmuch errors*\")
+                 (erase-buffer))
               (notmuch-search \"tag:inbox\")
               (notmuch-test-wait)
               (with-current-buffer \"*Messages*\"