1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-23 07:16:48 +02:00
Commit Graph

150 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema
4171fe14c3 store: removing trailing / for root_maildir
Other code depends on that.
2023-07-06 21:49:50 +03:00
Dirk-Jan C. Binnema
4920b56671 update to use fmt-based apis
Not complete, but a first big stab converting users of Mu::Error and
various g_warning & friends, format to the new libfmt-based APIs.
2023-07-05 23:10:13 +03:00
Dirk-Jan C. Binnema
c6fff6a281 all: update for API changes (config etc.)
Use the new & improved APIs.
2023-07-02 00:06:56 +03:00
Dirk-Jan C. Binnema
fd7c011195 lib: update for api changes, update tests
With the new Sexp. And expand unit tests.
2023-06-27 00:53:23 +03:00
Dirk-Jan C. Binnema
abfa6f277c mu: index html text as if it were plain text
This is a bit of hack to include html text in results.

Of course, html text is not really plain text, so this is a bit of a
hack until we introduce some html parsing step.
2023-01-31 23:41:57 +02:00
Dirk-Jan C. Binnema
6979a66630 utils: get rid of mu-util.[ch]
It was getting old...
Remove the unused parts, refactor the few parts still in use.
2023-01-14 20:02:05 +02:00
Dirk-Jan C. Binnema
27ecbbdd65 many: use Mu::Regex instead of std::regex
The former is PCRE-compatible, and faster than std::regex.
2022-12-30 11:15:03 +02:00
Dirk-Jan C. Binnema
d5fb15574b mu-query-match-decider: add 'Related' to flags
We were _replacing_ the flags (such as Duplicate), but we should add to
them instead.

Add a unit-test for this.
2022-12-08 19:33:15 +02:00
Dirk-Jan C. Binnema
da7c3b0c9a tests: update for move_message API update 2022-12-07 18:22:29 +02:00
Dirk-Jan C. Binnema
0b516c18c2 store: add mu_move_message dup flag test
Test the new functionality
2022-12-07 18:22:29 +02:00
Dirk-Jan C. Binnema
d2a3a13242 query/test: add term splitting unit test
For checking issue #2365.
2022-11-20 10:18:01 +02:00
Dirk-Jan C. Binnema
a417b38624 store: update for new sexp api
And use improved cached_sexp api (automatically handled with
mu-document now)
2022-11-07 18:38:03 +02:00
Dirk-Jan C. Binnema
6064c2e88b test-mu-store-query: make move/refresh test more rigorous 2022-11-01 18:41:10 +02:00
Dirk-Jan C. Binnema
83eceaf580 test-mu-store-query: make move/refresh test more rigorous 2022-10-30 11:39:33 +02:00
Dirk-Jan C. Binnema
06be7a24e7 test-mu-store-query: add unit test for dup message
For ticket #2327. Haven't been able to reproduce though.
2022-10-26 22:35:34 +03:00
Dirk-Jan C. Binnema
5367122c08 store: support reinit
Support reinitializing, based on some current store. This is useful for
upgrading. Note that this is only the backend implementation + tests.
2022-10-02 18:24:23 +03:00
Dirk-Jan C. Binnema
ca04ae4d65 test-mu-msg.cc: fix unit test
Fix typo.
2022-10-02 18:24:23 +03:00
Dirk-Jan C. Binnema
bb7c8d880a message: convert mime-parts to utf-8
Ensure that non-utf8 mime-parts are converted to utf8. This fixes a
problem with messages with such parts; added unit test.

Fixes #2333.
2022-09-19 18:27:03 +03:00
Dirk-Jan C. Binnema
6fdc20aeb1 tests: add unit-tests for references with fake message-ids
For #2312.
2022-08-11 23:06:12 +03:00
Dirk-Jan C. Binnema
317fe53ff7 tests: update test helpers and users
Move test-mu-common to mu-test-utils. Use mu_test_init as a wrapper for
g_test_init. Update users.
2022-08-11 22:55:10 +03:00
Dirk-Jan C. Binnema
9aabe74df6 mu4e: add more tests for related/skipdups queries 2022-08-07 12:01:18 +03:00
Dirk-Jan C. Binnema
9fdcee8c22 test-mu-store-query: add more contact-matching tests 2022-07-14 08:10:15 +03:00
Dirk-Jan C. Binnema
97459beed9 maildir: improve testing coverage
Remove some dead/unused code. Update docs. Add test cases.
2022-06-29 22:19:26 +03:00
Dirk-Jan C. Binnema
df80935c2e document: index some sub-parts as well
1. Also add 'normal' terms for some indexable fields
2. Add terms for e-mail address components

And add some tests.

This helps for some corner-case queries (see tests).

Fixes #2278
Fixes #2281
2022-06-29 08:00:43 +03:00
Dirk-Jan C. Binnema
23ac71e6a7 maildir: add tests for maildir_link / maildir_clear_links 2022-06-29 07:50:16 +03:00
Dirk-Jan C. Binnema
040d74a326 lib/test-mu-store-query: add aujourd'hui tests
We match aujourd'hui now; add a test.

Fixes #1150.
2022-06-14 23:48:59 +03:00
Dirk-Jan C. Binnema
1ec03ce07c message-file: filter out non-file flags
Only take flags from file names that are actually file-flags, not random other
things
2022-06-10 23:28:43 +03:00
Dirk-Jan C. Binnema
ce28c86803 tests: add store/query test
Add some tests for storing/indexing message and then run queries on them.
2022-06-09 00:39:34 +03:00
Dirk-Jan C. Binnema
4379e66b9f bench-store-index: make a bit more realistic
```
             .',;::::;,'.                djcb@evergrey
         .';:cccccccccccc:;,.            -------------
      .;cccccccccccccccccccccc;.         OS: Fedora release 36 (Thirty Six) x86_64
    .:cccccccccccccccccccccccccc:.       Host: MS-7B09 2.0
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 5.17.11-300.fc36.x86_64
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 6 hours, 16 mins
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Packages: 4340 (rpm), 70 (flatpak)
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Shell: zsh 5.8.1
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 3840x2160
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   WM: sway
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   Theme: Adwaita [GTK2]
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   Icons: Adwaita [GTK2]
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Terminal: tilix
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;     CPU: AMD Ryzen Threadripper 1950X (32) @ 3.399GHz
cccccc;dNMWXXXWM0::cccccccccccccc:,      GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
cccccccc;.:odl:.;cccccccccccccc:,.       Memory: 7101MiB / 15881MiB
:cccccccccccccccccccccccccccc:'.
.:cccccccccccccccccccccc:;,..
  '::cccccccccccccc::;,.

```

% make benchmark
ninja -C /home/djcb/Sources/mu/build benchmark
ninja: Entering directory `/home/djcb/Sources/mu/build'
[0/1] Running benchmark suite.
1/1 bench-store-index        OK             17.40s
2022-06-07 23:06:25 +03:00
Dirk-Jan C. Binnema
d89820b26b lib/tests: move tests to parent
Otherwise, the coverage checker won't notice them!
2022-06-04 00:41:28 +03:00
Dirk-Jan C. Binnema
172ff25bb6 mu-maildir: refactor some duplicate code
mu-flags & mu-maildir were having some duplicate code; refactor it into mu-message-file.{cc,hh}
2022-06-04 00:41:28 +03:00
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