Dirk-Jan C. Binnema
13f0e24241
lib: improve test coverage
...
Add a bunch of tests
2022-06-02 21:07:41 +03:00
Dirk-Jan C. Binnema
a66360eda5
maildir: revamp unit tests
...
Re-enable many of the tests that were turned off, and update them for the new impl.
2022-05-31 23:43:13 +03:00
Dirk-Jan C. Binnema
5c161cfdbb
lib/tests: add indexing benchmark
2022-05-28 00:51:08 +03:00
Dirk-Jan C. Binnema
9c9f9ecae3
lib: improve coverage a bit
2022-05-23 23:55:11 +03:00
Dirk-Jan C. Binnema
cea3167f3e
lib: remove some dead code (mu-str/utils)
...
Remove unused library code; recycle some electrons.
2022-05-19 23:38:49 +03:00
Dirk-Jan C. Binnema
80d84bf635
store: use Result<Store> builder, add auto upgrade
...
Make it a Result type, and add auto-upgrade (not enabled yet)
Update dependents.
2022-05-09 22:25:28 +03:00
Dirk-Jan C. Binnema
dc69505580
mu-maildir: No need for namespaced function names
...
Mu::mu_maildir_... -> Mu::maildir_...
2022-05-09 22:25:28 +03:00
Dirk-Jan C. Binnema
f83d1b3ed0
update tests: avoid helgrind warning
...
Log to the black_hole or helgrind gets unhappy
2022-05-06 22:17:53 +03:00
Dirk-Jan C. Binnema
6126d7ee62
store: ensure updates update message sexp too
...
And turn all "add" into "replace" so old messages get removed.
Update tests too.
2022-05-05 01:40:17 +03:00
Dirk-Jan C. Binnema
85fed37870
message/document: update sexp on the fly
...
Keep the sexp for the document up to date during scan / change, instead of
having a separate step.
2022-05-05 01:40:17 +03:00
Dirk-Jan C. Binnema
629006681a
message: update unit tests
2022-04-30 10:40:45 +03:00
Dirk-Jan C. Binnema
525fef479a
store: update to use Message; big cleanup
...
Remove much of the message processing from the store
2022-04-30 10:40:45 +03:00
Dirk-Jan C. Binnema
9e9e16a7ec
lib/tests: rework in terms of Mu::Message
2022-04-30 10:40:45 +03:00
Dirk-Jan C. Binnema
478ef67fc6
flags: rename flags_to_string -> to_string
...
For consistency.
2022-04-16 16:20:38 +03:00
Dirk-Jan C. Binnema
f7c84006d7
many: update for lib/message updates
...
Adapt to the new names / directory. Big commit, but mostly just very boring renaming.
2022-03-26 17:19:10 +02:00
Dirk-Jan C. Binnema
4c4fb1759f
message: move to lib/message, update naming
...
Basically, move/rename lib/mu-message* to lib/mu-*.
Add the beginnings of a Message class.
2022-03-26 17:19:10 +02:00
Dirk-Jan C. Binnema
7774261526
test-query: improve logging
2022-03-26 17:19:10 +02:00
Dirk-Jan C. Binnema
04913d8ea9
tests: update for mu-message-fields
2022-03-07 06:50:18 +02:00
Dirk-Jan C. Binnema
285185aac7
lib: add unit tests for message priority / flags
...
We already had _compile-time_ tests; but for coverage it's useful to make those
available as runtime-tests, too.
2022-02-22 23:29:55 +02:00
Dirk-Jan C. Binnema
ec826cd838
tests: update naming
2022-02-21 23:51:46 +02:00
Dirk-Jan C. Binnema
4eddf4e6ba
update unit tests
2022-02-21 23:51:46 +02:00
Dirk-Jan C. Binnema
a82bd77d09
lib: rename contacts into contacts-cache
...
Plus dependents.
2022-02-21 23:22:42 +02:00
Dirk-Jan C. Binnema
3aa053e158
mu-msg: use Mu::MessageContact
...
Use the new contact class
2022-02-21 23:22:42 +02:00
Dirk-Jan C. Binnema
d436a47c1f
lib: Implement Mu::MessageContact
...
Implement a new struct Mu::MessageContact to usurps some of the different types
for contact information.
Sprinkle some "modern C++" on it for convenience.
2022-02-21 23:22:42 +02:00
Dirk-Jan C. Binnema
c0da564bba
lib: fix clang compatibility / warnings
2022-02-18 10:49:56 +02:00
Dirk-Jan C. Binnema
4eabf1a64a
*: update for for mu-maildir changes
...
Update the dependencies.
2022-02-17 23:48:59 +02:00
Dirk-Jan C. Binnema
f6f17d5d6b
*: update code for Mu::MessageFlags
...
Migrate the code to use the new niceness
2022-02-17 23:48:59 +02:00
Dirk-Jan C. Binnema
473134a7b1
lib: replace MuFlags with Mu::MessageFlags
...
Modernize the ancient MuFlags code to C++17
2022-02-16 23:18:16 +02:00
Dirk-Jan C. Binnema
3820118246
store: rename "metadata" into "properties"
...
properties are the constant (for the duration) values for a store; metadata may
change, so reserve that name for that.
2022-02-14 11:12:26 +02:00
Dirk-Jan C. Binnema
23fc8bdba8
update code for Mu::MessagePriority
...
Update dependent code
2022-02-14 11:12:26 +02:00
Dirk-Jan C. Binnema
e818e94d0e
build: fix some scan-build warnings
2022-02-07 17:36:34 +02:00
Dirk-Jan C. Binnema
ebc9b88f80
store/query: update for new store/query api
...
Update to the new API.
2022-01-30 14:52:41 +02:00
Dirk-Jan C. Binnema
3001c7832d
tests: add unit test for cjk handling
...
This test exposes some problem finding longer CJK strings; see: issue #1428 .
The test does not _pass_ yet, so skip it for now.
2021-11-22 22:23:18 +02:00
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
djcb
50fc992ae2
* fix list parsing
2013-05-13 23:01:53 +03:00
djcb
5d069e786f
* lib: updates for mu-msg-field / mu-str updates
2013-05-13 00:03:47 +03:00
djcb
7d48ed53a7
* mu: (re)add special handling for '$' ( fixes #193 )
2013-04-28 21:54:25 +03:00
djcb
a5001acff0
* mu: more 'fixing'/'massaging' of queries
2013-04-17 00:09:08 +03:00
djcb
1f24e224a9
* more more copyright year updates
2013-03-30 11:38:01 +02:00
djcb
855e81db99
* update copyright years
2013-03-30 11:32:07 +02:00
djcb
f176c025d3
* add references unit test
2012-12-28 12:50:02 +02:00
djcb
c5f8ea6451
* use AM_CPPFLAGS instead of INCLUDES
2012-12-22 22:54:50 +02:00
djcb
241af50e97
* update / add testcases for string normalization
2012-12-09 13:34:16 +02:00
djcb
30f93663b0
* lib: do some more escaping of body text
2012-11-18 22:09:56 +02:00
djcb
ef1791ec7c
* support single dates (shortcut for ranges) in queries (thanks to Eygene Ryabinkin)
2012-11-17 21:25:09 +02:00
djcb
8e60018176
* fix test-mu-maildir unit test for running as root
2012-11-08 22:31:51 +02:00
djcb
e5425081cc
* remove hard dependency on wordexp.h (OpenBSD does not have it)
2012-11-08 22:19:28 +02:00
djcb
a01196499f
* mu-cfind: some cleanups / better help
2012-10-24 23:47:47 +03:00
djcb
da9c4bf4f7
* lib: add mu_util_support and mu_util_program_in_path + unit tests
2012-10-18 12:11:43 +03:00
djcb
b4219bd06b
* minor
2012-09-16 18:00:51 +03:00
djcb
020bf110cb
* fix leak in test-mu-store
2012-08-11 22:30:13 +03:00