Commit Graph

86 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema 48d3f9cfab tests: move to subdir, move to meson
De-clutter the source directories a bit. Ensure tests build with meson, and
remove from autotools in a few places (no need to do things twice).
2021-11-08 23:58:05 +02:00
Dirk-Jan C. Binnema 80c5e25b08 mu: move mu/mu/tests, lib/tests one level up
Makes it easier to generator code-coverage reports
2020-01-01 15:56:48 +02:00
Dirk-Jan C. Binnema b55e191421 update for lib/utils split
Update sources with the new paths
2019-12-22 15:26:45 +02:00
Dirk-Jan C. Binnema e5337e7658 lib: split out utils to lib/utils 2019-12-22 15:26:45 +02:00
Dirk-Jan C. Binnema 0c7831b5c9
Merge pull request #1511 from derekschrock/test-mu-maildir
lib: Allow hostname of newbase to match alnum
2019-11-17 14:20:17 +02:00
Derek Schrock 7d439928f5 lib: Use more portable locale en_US.UTF-8
On some systems (FreeBSD) en_US.utf8 doesn't exist.  Use a portable
locale en_US.UTF-8.
2019-11-16 23:01:18 -05:00
Derek Schrock 1585b933fb lib: Allow hostname of newbase to match alnum
Possible hostnames might have digits and - in them.  Crude regex to
allow hostnames that start with alnum followed by alnum or "-".

Fixes #1399
2019-11-16 22:59:04 -05:00
Dirk-Jan C. Binnema be4860befe tests: update for lib/mu-store changes 2019-07-30 08:51:04 +03:00
Dirk-Jan C. Binnema 69229a4228 mu: remove contacts-path leftovers
The contacts are now embedded in the xapian database, so we don't need
the contact-path anymore. Let's remove some leftovers.
2019-07-13 13:43:57 +03:00
djcb 9edcae0203 update store, msg for new contacts-cache handling 2019-05-11 13:41:03 +03:00
djcb bd52902290 contacts: update test cases for updated contacts
Remove the old ones, add new ones.
2019-05-11 13:41:03 +03:00
djcb 6e8378ddcd mu: update crypto verify test 2019-03-24 11:54:12 +02:00
Ulrich Ölmann 493a9efa7a mu, tests: fix gcc-8.2.0 warnings
Without this commit gcc-8.2.0 whines

|   CC       mu-msg-json.lo
| mu-msg-json.c: In function ‘get_temp_file_maybe’:
| mu-msg-json.c:254:14: warning: unused variable ‘tmpfile’ [-Wunused-variable]
|   char *tmp, *tmpfile;
|               ^~~~~~~
| mu-msg-json.c:254:8: warning: unused variable ‘tmp’ [-Wunused-variable]
|   char *tmp, *tmpfile;
|         ^~~
| mu-msg-json.c: In function ‘add_part_crypto’:
| mu-msg-json.c:276:21: warning: unused variable ‘s’ [-Wunused-variable]
|   char    *signers, *s;
|                      ^
| mu-msg-json.c:276:11: warning: unused variable ‘signers’ [-Wunused-variable]
|   char    *signers, *s;
|            ^~~~~~~
| mu-msg-json.c: In function ‘each_part’:
| mu-msg-json.c:332:14: warning: variable ‘cid’ set but not used [-Wunused-but-set-variable]
|   const char *cid;
|               ^~~

and

|   CC       test-mu-str.o
| test-mu-str.c: In function ‘test_mu_str_subject_normalize’:
| test-mu-str.c:282:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "test123", "test123" },
|      ^~~~~~~~~
| test-mu-str.c:282:16: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "test123", "test123" },
|                 ^~~~~~~~~
| test-mu-str.c:283:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re:test123", "test123" },
|      ^~~~~~~~~~~~
| test-mu-str.c:283:19: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re:test123", "test123" },
|                    ^~~~~~~~~
| test-mu-str.c:284:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re: Fwd: test123", "test123" },
|      ^~~~~~~~~~~~~~~~~~
| test-mu-str.c:284:25: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re: Fwd: test123", "test123" },
|                          ^~~~~~~~~
| test-mu-str.c:285:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re[3]: Fwd: test123", "test123" },
|      ^~~~~~~~~~~~~~~~~~~~~
| test-mu-str.c:285:28: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "Re[3]: Fwd: test123", "test123" },
|                             ^~~~~~~~~
| test-mu-str.c:286:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "operation: mindcrime", "operation: mindcrime" }, /*...*/
|      ^~~~~~~~~~~~~~~~~~~~~~
| test-mu-str.c:286:29: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "operation: mindcrime", "operation: mindcrime" }, /*...*/
|                              ^~~~~~~~~~~~~~~~~~~~~~
| test-mu-str.c:287:5: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "", "" }
|      ^~
| test-mu-str.c:287:9: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
|    { "", "" }
|          ^~
2019-01-11 06:48:51 +01:00
djcb 93bd1b8ce7 mu: add soft dependency on json-glib
If it's available it will be used.
2018-11-11 12:12:36 +02:00
djcb 052a228be7 add optional support for building with asan 2018-11-04 12:31:32 +02:00
djcb ec51f66da2 test-str: fix arglist test 2017-11-04 13:06:43 +02:00
djcb 509500a9d2 server: update query processing
fix quoting issues with mu4e
2017-10-27 18:43:33 +03:00
djcb 17c97d4606 mu: remove some dead code 2017-10-25 23:50:17 +03:00
djcb 2d966ee2ad tests: remove obsolete tests 2017-10-25 23:50:17 +03:00
Sean 'Shaleh' Perry 588d227171 Simplify logic of mu_str_remove_ctrl_in_place. Add tests. 2017-06-24 13:26:10 +02:00
djcb 99423234b8 mu: fix some compiler warnings 2017-06-24 12:20:16 +02:00
Stig Brautaset cdc2fa1bd8 Respect format=flowed and delsp=yes for viewing plain-text messages 2017-01-31 11:28:55 +00:00
djcb a81270583f Add unit-test for multi-to/cc recipients
To check for the report in Issue #826.
2016-05-15 16:21:20 +03:00
djcb 413d0e1f49 fix make-dist
Silence a few tests that pass, but not with make-dist. Obviously, this
needs some more investigation.
2016-01-20 20:18:07 +02:00
djcb 3cf96899ef mu: decode mailing-list headers
MIME-decode mailing list headers, too. Also add a unit test. This fixes
issue #728.
2015-12-15 07:21:26 +02:00
djcb a350e2047d Change format for filenames
It seems some tools try to interpret the filename of message files,
even though they shouldn't:
   "Do not try to extract information from unique names."

In particular, they seem to interpret the first part of the name (before
the first dot) as the # of seconds since the Unix epoch (ie.,
time(NULL)). That's not what mu/mu4e put there.

So, let's conform a bit more to the expected filename (as per the
maildir spec), so we're not confusing those tools.
2015-10-02 17:43:38 +03:00
Adam Sampson b44039eda9 Ensure tests have unique names.
glib 2.46 complains if this isn't the case:
(test-mu-str:28790): GLib-ERROR **: duplicate test case path: /mu-str/mu-str-esc-to-list
2015-09-23 12:01:19 +01:00
djcb 518b160025 mu: fix `make distcheck`
We were not including some of the test files in the tarballs; add them.
2015-09-22 12:03:44 +03:00
djcb 7eb244b3b0 mu: don't use __FUNCTION__, use __func__
__FUNCTION__ is deprecated and gives compilation warnings. __func__ is
standardized in c99.
2015-04-22 21:06:31 +03:00
djcb 3c104dfdf4 mu: deactivate unit test for mu_util_dir_expand
The test fails in some cases with interesting directory setups, although
the function does work. So de-activate the test for now, until we come
up with a better one.
2015-03-15 13:26:56 +02:00
Jakub Sitnicki ede481d4c0 mu: Test splicing child containers when there is only one thread
This test reproduces a regression introduced by commit 97101f1f82
("mu: Prune empty container when an only child gets promoted to the
root set").

When the results of a mu-find query contain only a one thread:

$ mu find --threads --fields 'd s' ''
Sat 09 Aug 2014 07:00:00 PM CEST [mu4e] Test Message
  `-> Sat 09 Aug 2014 08:30:00 PM CEST Re: [mu4e] Test Message

... and we narrow down the query in such a way that the root message
gets excluded, then a crash occurs:

$ mu find --threads --fields 'd s' '' date:2014-08-09/20:00..2014-08-09/21:00
**
ERROR:mu-container.c:117:mu_container_append_siblings: assertion failed: (c)
Aborted (core dumped)

Reported-by: Josiah Schwab <jschwab@gmail.com>
2014-08-15 10:10:39 +02:00
Jakub Sitnicki 856a651d38 tests: threads: Test if grandchild message promotes only its subthread 2014-07-15 07:24:47 +02:00
Jakub Sitnicki cbfe28b885 tests: threads: Test if grandchild message promotes its thread 2014-07-15 07:24:21 +02:00
Jakub Sitnicki b0357a2d7a tests: threads: Test if child message doesn't promote its thread 2014-07-15 07:23:53 +02:00
Jakub Sitnicki c5d4f7f338 tests: threads: Test if 2nd child message promotes its subthread 2014-07-15 07:22:53 +02:00
Jakub Sitnicki 22927a7dcf tests: threads: Test if 1st child message promotes its thread 2014-07-15 07:22:11 +02:00
djcb 599d641034 * lib: fix broken unit test 2014-01-15 21:27:18 +02:00
djcb c36030a086 * handle message-ids a bit specially, update unit tests 2013-10-13 20:05:29 +03:00
djcb b7324d5af6 * cleanup: drop gmime-2.4 support 2013-07-21 14:44:44 +03:00
djcb b17f26537b * mu: unbreak unit test after flag changes (fixes #247) 2013-07-07 10:46:35 +03:00
djcb d57b109557 * mu-str: treat '..' in non-range fields differently 2013-06-01 06:07:29 -07:00
djcb e7c63cee47 * update some unit tests 2013-05-30 06:15:22 -07:00
djcb e97ec2d51c * fix matching backslashes, add some tests 2013-05-27 05:49:43 -07:00
djcb bdf7ca65c7 * test-mu-maildir: fix regexp 2013-05-27 05:48:19 -07:00
djcb 3dae623879 * add mu_str_replace 2013-05-26 11:16:02 -07:00
djcb ad6b3d8f0f * add unit test for the optional message file renaming 2013-05-25 19:28:40 +03:00
djcb 10b64bb654 * cosmetic 2013-05-21 08:05:14 +03:00
djcb 59f855b39b * lib: add mu_str_parse_arglist + unit tests 2013-05-20 05:14:35 +03:00
djcb a2eef4fa41 * handle invalid utf8; fixes #211 (hopefully) 2013-05-15 21:36:27 +03:00
djcb 00d0cb0f28 * the query parser update (few commits back) fixes #210 too, this is unit test for it. 2013-05-15 00:17:36 +03:00