<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/emacs, branch 0.9</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.9</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.9'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2011-10-09T11:26:08Z</updated>
<entry>
<title>test: add two emacs tests for show mode refresh</title>
<updated>2011-10-09T11:26:08Z</updated>
<author>
<name>Jameson Graef Rollins</name>
<email>jrollins@finestructure.net</email>
</author>
<published>2011-10-09T03:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=808fbff530319fe841f2f3c5b607d2ce3f0c424d'/>
<id>urn:sha1:808fbff530319fe841f2f3c5b607d2ce3f0c424d</id>
<content type='text'>
The first test tests that the notmuch-show-refresh-view function
produces the exact same output for an unmodified show buffer.  This
test should pass since the relevant functionality has already been
applied.

The second test tests show refresh for a show buffer that has been
modified by navigation and message visibility toggling.  Ideally
refresh-view should preserve this state of the notmuch-show buffer.
Unfortunately it currently does not, so this test is know to be broken
and is marked as such.
</content>
</entry>
<entry>
<title>test: add emacs test for hiding a message following an HTML part</title>
<updated>2011-09-10T13:13:40Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-07-04T04:07:21Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c6a3a768fef9f59f483af04f4418d350efc27968'/>
<id>urn:sha1:c6a3a768fef9f59f483af04f4418d350efc27968</id>
<content type='text'>
Human-friendly scenario:

* open a thread where a message which ends with an HTML part is
  followed by another message

* make the first message visible

* goto the beginning of the second message (first line, first colon)

* hit "RET"

Result: nothing happens except for "No URL at point" message

Expected result: the second message is shown/hidden

The root cause is that the HTML part has `keymap' text property set.
In particular, "RET" is bound to visit a URL at point.  The problem is
that `keymap' property affects the next character following the region
it is set to (see elisp manual [1]).  Hence, the first character of
the next message has a keymap inherited from the HTML part.

[1] http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.html
</content>
</entry>
<entry>
<title>test: update documentation for test_emacs in test/README</title>
<updated>2011-09-10T13:12:03Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-07-04T04:07:19Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0db3a4d5be93710837962b8260420cfc5a8b968e'/>
<id>urn:sha1:0db3a4d5be93710837962b8260420cfc5a8b968e</id>
<content type='text'>
Update test_emacs documentation in test/README according to the latest
changes in emacs tests.  Move the note regarding setting variables
from test/emacs to test/README.
</content>
</entry>
<entry>
<title>test: revert non-intentional changes introduced in eb4cf465</title>
<updated>2011-06-29T21:20:57Z</updated>
<author>
<name>Pieter Praet</name>
<email>pieter@praet.org</email>
</author>
<published>2011-06-29T20:23:47Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ec1b568929f53b99362d6b254085da03231a2a26'/>
<id>urn:sha1:ec1b568929f53b99362d6b254085da03231a2a26</id>
<content type='text'>
eb4cf465 introduces changes which weren't part of the submitted
patch (id:"87liwlip2j.fsf@gmail.com"), presumably made during
resolving merge conflicts.

The first one causes the title of a test to be printed a second time,
in place of the correct title:

  PASS   Message with .. in Message-Id:
  PASS   Message with .. in Message-Id:

instead of:

  PASS   Message with .. in Message-Id:
  PASS   Sending a message via (fake) SMTP

The second one is simply the insertion of a line break, so no harm there.

This commit reverts both changes, as they were clearly accidental.

Signed-off-by: Pieter Praet &lt;pieter@praet.org&gt;
</content>
</entry>
<entry>
<title>test: use emacsclient(1) for Emacs tests</title>
<updated>2011-06-29T00:10:55Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-06-28T04:56:17Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a854d06e92645350b7ec3f6cd1a10a2f6933104f'/>
<id>urn:sha1:a854d06e92645350b7ec3f6cd1a10a2f6933104f</id>
<content type='text'>
Before the change, every Emacs test ran in a separate Emacs
instance.  Starting Emacs many times wastes considerable time and
it gets worse as the test suite grows.  The patch solves this by
using a single Emacs server and emacsclient(1) to run multiple
tests.  Emacs server is started on the first test_emacs call and
stopped when test_done is called.  We take care not to leave
orphan Emacs processes behind when test is terminated by whatever
reason: Emacs server runs a watchdog that periodically checks
that the test is still running.

Some tests need to provide user input.  Before the change, this
was done using echo(1) to Emacs stdin.  This no longer works and
instead `standard-input' variable is set accordingly to make
`read' return the appropriate string.
</content>
</entry>
<entry>
<title>test:Improve test behaviors when --root is used</title>
<updated>2011-06-28T23:01:56Z</updated>
<author>
<name>Mark Anderson</name>
<email>ma.skies@gmail.com</email>
</author>
<published>2011-06-28T22:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=eb4cf465a5c179c711c15649fc90c7377850cb77'/>
<id>urn:sha1:eb4cf465a5c179c711c15649fc90c7377850cb77</id>
<content type='text'>
Change add_email_corpus, emacs_deliver_message and tests to use
$TEST_DIRECTORY instead of '..'.

This improves the behavior of the usage of --root=&lt;dir&gt;, as the
assumption of what '..' means will usually be incorrect.

Document -root option in README and update valgrind to work with
-root.
</content>
</entry>
<entry>
<title>test: set variables using `let' instead of `setq' in Emacs tests</title>
<updated>2011-06-28T22:06:47Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-06-28T04:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0cc5483a9cc496bbaa1a6aef03e99b4a7686f779'/>
<id>urn:sha1:0cc5483a9cc496bbaa1a6aef03e99b4a7686f779</id>
<content type='text'>
Using `setq' for setting variables in Emacs tests affect other
tests that may run in the same Emacs environment.  Currently it
works because each test is run in a separate Emacs instance.  But
in the future multiple tests will run in a single Emacs instance.
The patch changes all variables to use `let', so the scope of the
change is limited to a single test.
</content>
</entry>
<entry>
<title>test: use emacs_deliver_message in Emacs SMTP send test</title>
<updated>2011-06-28T22:06:47Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-06-28T04:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0417c1fad67440756aa789c40fbb5153a98f4ca0'/>
<id>urn:sha1:0417c1fad67440756aa789c40fbb5153a98f4ca0</id>
<content type='text'>
Minor changes to expected results of other Emacs tests were
needed because the message Date header changed.
</content>
</entry>
<entry>
<title>test: remove some sed(1) calls in Emacs tests</title>
<updated>2011-06-28T22:06:47Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-06-28T04:45:07Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=5eb6b2767ad70a76a42e618961c970070b8a3b90'/>
<id>urn:sha1:5eb6b2767ad70a76a42e618961c970070b8a3b90</id>
<content type='text'>
Few Emacs tests used sed(1) to remove unexpected output in the
beginning to avoid getting confused by messages such as "Parsing
/home/cworth/.mailrc... done".  This is no longer needed since
tests are run in a temporary home directory instead of the user's
one.  So remove these sed(1) calls.
</content>
</entry>
<entry>
<title>test: save buffer content to file instead of printing it in Emacs tests</title>
<updated>2011-06-28T22:06:47Z</updated>
<author>
<name>Dmitry Kurochkin</name>
<email>dmitry.kurochkin@gmail.com</email>
</author>
<published>2011-06-28T04:45:06Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3b24b396c4c9178603dec5380b4e89f6795dee1f'/>
<id>urn:sha1:3b24b396c4c9178603dec5380b4e89f6795dee1f</id>
<content type='text'>
Before the change, the common Emacs test scheme was to print
buffer content to stdout and redirect it to a file or capture it
in a shell variable.  This does not work if we switch to using
emacsclient(1) for running the tests, because you can not print
to the stdout in this case. (Actually, you can print to stdout
from Emacs server, but you can not capture the output on
emacsclient(1)).

The patch introduces new Emacs test auxiliary functions:
`test-output' and `test-visible-output'.  These functions are
used to save buffer content to a file directly from Emacs.  For
most tests the changes are trivial, because Emacs stdout output
was redirected to a file anyway.  But some tests captured the
output in a shell variable and compare it with the expected
output using test_expect_equal.  These tests are changed to use
files and test_expect_equal_file instead.

Note: even if we do not switch Emacs tests to emacsclient(1), the
patch makes tests cleaner and is an improvement.
</content>
</entry>
</feed>
