<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/test/test-lib.sh, branch 0.17_rc2</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=0.17_rc2</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=0.17_rc2'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2013-11-24T00:25:29Z</updated>
<entry>
<title>test: replace $PWD with YYY in emacs &amp; emacs-show tests</title>
<updated>2013-11-24T00:25:29Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2013-11-23T11:01:16Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=2560996b7ebb08cca7e20fbb182998bc2e0e2151'/>
<id>urn:sha1:2560996b7ebb08cca7e20fbb182998bc2e0e2151</id>
<content type='text'>
When executed command line is written to *Notmuch errors* buffer,
shell-quote-argument will backslash-escape any char that is not in
"POSIX filename characters" (i.e. matching "[^-0-9a-zA-Z_./\n]").

Currently in two emacs tests shell has expanded $PWD as part of
emacs variable, which will later be fed to #'shell-quote-argument
and finally written to ERROR file. If $PWD contained non-POSIX
filename characters, data in ERROR file will not match $PWD when
later comparing in shell. Therefore, in these two particular cases
the escaped $PWD is replaced with YYY in ERROR file and expected
content is adjusted accordingly.
</content>
</entry>
<entry>
<title>test: set mail host in emacs_deliver</title>
<updated>2013-10-14T11:23:07Z</updated>
<author>
<name>Mark Walters</name>
<email>markwalters1009@gmail.com</email>
</author>
<published>2013-10-12T07:36:30Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=48231337b7ead05d77d0961b034df89871789d0a'/>
<id>urn:sha1:48231337b7ead05d77d0961b034df89871789d0a</id>
<content type='text'>
One test (reply to encrypted message in the crypto test) recently
started failing on some systems. The failure I saw were two extra
lines of the form
&lt;87d2nbc5xg.fsf@host.i-did-not-set--mail-host-address--so-tickle-me&gt;

The test pipes the output through

grep -v -e '^In-Reply-To:' -e '^References:'

which would normally these two ids but it does not, in this case,
because they are so long they get put on a separate line in the output.

To fix this we set mail-host-address for emacs deliver. example.com
seems a sensible address to use. This is short enough that we don't
get the line breaks above and the tests then all pass.
</content>
</entry>
<entry>
<title>test: unset 'xpg_echo' bash shell option</title>
<updated>2013-09-09T01:42:12Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2013-08-20T16:16:43Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=fae15296eca133c53e17e379e2efc839e4c1907e'/>
<id>urn:sha1:fae15296eca133c53e17e379e2efc839e4c1907e</id>
<content type='text'>
When 'xpg_echo' bash shell option is unset (usually the default)
echo builtin does not expand backslash-escape sequences by default
(i.e. '\n' is echoed as '\n' instead of newline). Not all bash
installations have this feature we depend on activated by default.

Note that the feature is bash (and GNU /bin/echo) specific. It is used
as it is convenient. If portability is needed (elsewhere) use printf(1)
(also often available as a shell builtin).
</content>
</entry>
<entry>
<title>test/test-lib.sh: separate signaled exit</title>
<updated>2013-02-19T00:17:17Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2013-01-21T03:01:46Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0d8d11d3383af3e9c38d818d97a04886f3521d58'/>
<id>urn:sha1:0d8d11d3383af3e9c38d818d97a04886f3521d58</id>
<content type='text'>
When execution of tests is interrupted by signal coming outside of the
test system itself, output just one line "interrupted by signal &lt;num&gt;"
message to standard output. This distinguishes the case from internal
exit and reduces noise.
</content>
</entry>
<entry>
<title>test/test-lib.sh: use $test_subtest_name in all tests</title>
<updated>2013-02-19T00:17:05Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2013-01-21T03:01:45Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=3a15602d8e069d469965721f4d526a26da38887b'/>
<id>urn:sha1:3a15602d8e069d469965721f4d526a26da38887b</id>
<content type='text'>
Set the variable '$test_subtest_name' in all functions which starts
a new test and use that variable in all functions that output
test results.

Additionally output the latest '$test_subtest_name' in case of
abnormal exit, to avoid confusion.
</content>
</entry>
<entry>
<title>test/test-lib.sh: use vt100 as dtach terminal if TERM dumb or unset/empty</title>
<updated>2013-01-24T10:59:21Z</updated>
<author>
<name>Tomi Ollila</name>
<email>tomi.ollila@iki.fi</email>
</author>
<published>2013-01-24T07:39:02Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a12f810a00cf0779e9b62c400f7ccd7af9d3a113'/>
<id>urn:sha1:a12f810a00cf0779e9b62c400f7ccd7af9d3a113</id>
<content type='text'>
The TERM environment variable is set to 'dumb' when running tests, but
the original value of it is stored for echoing colors and running emacs
(somewhat interactively) in detached session. Emacs requires some
terminal control sequences to be available for interactive operation.
In case original TERM is (also) 'dumb' (or unset/empty) emacs cannot
run interactively. To fix this problem dtach (and emacs as it's child
process) is run with TERM=vt100 in case original TERM was unset, empty
or 'dumb'. This way there is a chance to run emacs tests with different
user terminals and potentially find problems there.
</content>
</entry>
<entry>
<title>test: normalize only message filenames in show json</title>
<updated>2012-12-17T13:08:04Z</updated>
<author>
<name>Peter Wang</name>
<email>novalazy@gmail.com</email>
</author>
<published>2012-12-15T03:06:42Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ee425ae2ad8605a1c57ba2f71562db9f060d2cea'/>
<id>urn:sha1:ee425ae2ad8605a1c57ba2f71562db9f060d2cea</id>
<content type='text'>
notmuch_json_show_sanitize replaced "filename" field values even in part
structures, where the value is predictable.  Make it only normalize the
filename value if it is an absolute path (begins with slash), which is
true of the Maildir filenames that were intended to be normalized away.
</content>
</entry>
<entry>
<title>test: use perl instead of sed -r for portability</title>
<updated>2012-12-08T13:19:34Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2012-12-04T21:26:33Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=540a34d096035ebf0c79990f030210b3fb65fa4f'/>
<id>urn:sha1:540a34d096035ebf0c79990f030210b3fb65fa4f</id>
<content type='text'>
Our OS X users report -r is not a supported option for sed. Use perl
instead.
</content>
</entry>
<entry>
<title>test: Fix UTF-8 JSON tests in Python 3</title>
<updated>2012-12-08T13:19:34Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-12-04T15:24:14Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=21326a1e6b23f0dc98d13c93cd5023e148fd1a5d'/>
<id>urn:sha1:21326a1e6b23f0dc98d13c93cd5023e148fd1a5d</id>
<content type='text'>
test_expect_equal_json uses json.tool from the system Python.  While
Python 2 wasn't picky about the encoding of stdin, Python 3 decodes
stdin strictly according to the environment.  Since we set LC_ALL=C
for the tests, Python 3's json.tool was assuming stdin would be in
ASCII and aborting when it couldn't decode the UTF-8 characters from
some of the JSON tests.  This patch sets the PYTHONIOENCODING
environment variable to utf-8 when invoking json.tool to override
Python's default encoding choice.
</content>
</entry>
<entry>
<title>test: Use associative arrays to track external prereqs</title>
<updated>2012-11-29T13:24:12Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-11-28T04:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=7a0813b72a04339581dfbe06fb9a6de9bc161025'/>
<id>urn:sha1:7a0813b72a04339581dfbe06fb9a6de9bc161025</id>
<content type='text'>
Previously, the test framework generated a variable name for each
external prereq as a poor man's associative array.  Unfortunately,
prereqs names may not be legal variable names, leading to
unintelligible bash errors like
  test_missing_external_prereq_emacsclient.emacs24_=t: command not found

Using proper associative arrays to track prereqs, in addition to being
much cleaner than generating variable names and using grep to
carefully construct unique string lists, removes restrictions on
prereq names.
</content>
</entry>
</feed>
