Commit Graph

1197 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema 6dac4423e2 mu-contacts: remove some debug logging 2023-10-30 22:55:37 +02:00
Dirk-Jan C. Binnema de302e7609 lib/tests: add one more foo-bar regexp test 2023-10-29 17:16:05 +02:00
Dirk-Jan C. Binnema 51ecf46d81 wip: xapianizer unit tests 2023-10-14 16:25:58 +03:00
Dirk-Jan C. Binnema f4a930cd19 lib: query-processor: fix handling unknown flags
Fixes #2567.
2023-10-09 23:50:08 +03:00
Dirk-Jan C. Binnema fcd89039eb expand_path: better handle paths with spaces
I.e., work around surprising behavior of wordexp

Fixes #2566.
2023-10-07 00:18:56 +03:00
Dirk-Jan C. Binnema ee18c02762 maildir: improve unit tests
And get some more info from run_command.
2023-09-24 21:33:18 +03:00
Dirk-Jan C. Binnema 4a0eba8ddf improve unit tests 2023-09-24 20:21:57 +03:00
Dirk-Jan C. Binnema e16e1f78ce command-handler: more unit tests 2023-09-24 17:29:56 +03:00
Dirk-Jan C. Binnema fa22fc28d9 error: more unit tests 2023-09-24 17:29:56 +03:00
Dirk-Jan C. Binnema abb0fb4fd5 utils/add: improve unit test coverage 2023-09-24 17:29:56 +03:00
Dirk-Jan C. Binnema b0dca49dc0 store: better handling moving messages
sort results (for testing)

with the ChangeName flag, also apply to dup messages.
2023-09-24 17:29:56 +03:00
Dirk-Jan C. Binnema 5d37c18d7d lib: use flags_maildir_file
It's a better name. And fix some typos.
2023-09-24 17:29:56 +03:00
Dirk-Jan C. Binnema 2d20074b99 mu-move: add new move sub command
Add sub-command to move messages; add tests and docs.

Fixes #157
2023-09-24 17:29:08 +03:00
Dirk-Jan C. Binnema 1a3dc46866 lib: maildir/store: more tests 2023-09-23 09:28:45 +03:00
Dirk-Jan C. Binnema 655a6b0499 lib: xapian-db/config: more tests
...and xapian-db gets a small API update, update store as well.
2023-09-23 09:27:46 +03:00
Dirk-Jan C. Binnema 11003000e8 mu: log warning when exiting with error 2023-09-23 09:26:37 +03:00
Dirk-Jan C. Binnema 04e3a2f9a8 mu-utils: improve tests 2023-09-21 23:41:15 +03:00
Dirk-Jan C. Binnema 6ce94ce914 mu-utils: add to_string_view 2023-09-21 23:41:15 +03:00
Dirk-Jan C. Binnema 8ba153067b mu-maildir: use the new run_command0
And fix some docstrings.
2023-09-21 23:41:15 +03:00
Dirk-Jan C. Binnema b771fd6394 query-parser: handle naked NOT, add tests
We weren't correctly expanding "naked NOT" -> AND_NOT

Fixes #2559.
2023-09-21 19:29:59 +03:00
Dirk-Jan C. Binnema 1df4452ff3 server: properly delete output-stream files
logic inversion
2023-09-20 21:35:55 +03:00
Dirk-Jan C. Binnema 24add72126 mu-file-utils: add run_command0
To ensure command ran and had exit-code=0 in one go.
2023-09-19 22:26:45 +03:00
Dirk-Jan C. Binnema ae87be6a48 flags: add flags_mail_dir_file util
And some whitespace cleanup
2023-09-19 22:26:45 +03:00
Dirk-Jan C. Binnema 472f69beb2 utils-file: default args for canonicalize_filename / determine_dtype
Make a little easier to use
2023-09-19 22:26:30 +03:00
Dirk-Jan C. Binnema b5b90a0673 query-parser: 'not' should take units
NOT should bind more tightly.
2023-09-19 22:11:18 +03:00
Dirk-Jan C. Binnema 5bda8c321b query: move phrasification to mu-query-parser
Do the "phrasification" for matching fields later during query parsing;
this allows for handling combination fields correctly.

Also match both the normal term and the "phrase term", so we catch more
cases. Update/extend unit tests.

This fixes the "kata-container" issue also for body test.

Fixes #2167.
2023-09-17 18:11:21 +03:00
Dirk-Jan C. Binnema 7cbab21099 utils: add utf8_wordbreak
Determine if a string has wordbreaks in a mostly Xapian-compatible way.
We need this to determine what strings should be considered "phrases".
2023-09-17 18:11:10 +03:00
Dirk-Jan C. Binnema 94c90bd0c5 fields: 'phrasable' instead of 'indexable'
'Phrasable' is probably a bit clearer description.
2023-09-17 18:11:10 +03:00
Dirk-Jan C. Binnema a2046dc2b1 mu-index: add blocking start()
Useful for unit tests
2023-09-16 11:12:16 +03:00
Dirk-Jan C. Binnema c78dafd723 provide end-user hints and show them
Only a few for now.
2023-09-16 11:12:16 +03:00
Dirk-Jan C. Binnema 3123f3e983 mu-error: allow for adding end-user hints 2023-09-16 11:12:16 +03:00
Dirk-Jan C. Binnema 0a12b70d7b utils-file: improve mu_play
implement in terms of run_command
2023-09-13 23:03:51 +03:00
Dirk-Jan C. Binnema 9dcbe1d96c lib: unit tests: improve / better coverage 2023-09-13 23:02:53 +03:00
Dirk-Jan C. Binnema 7c16d080d2
Merge pull request #2552 from dme/devel/misc
mu: Fix "expected command" server error report
2023-09-12 22:28:30 +03:00
Dirk-Jan C. Binnema 2f5602b938 unit tests: improve
and add a new one for the indexer
2023-09-12 21:38:57 +03:00
Dirk-Jan C. Binnema 805c5aa287 mu-query: remove unnused move ctor 2023-09-12 21:35:47 +03:00
David Edmondson a8440bb258 mu: Fix "expected command" server error report 2023-09-12 08:37:10 +01:00
Dirk-Jan C. Binnema 8287b9802e lib: replace mu-bookmarks with mu-query-macros
And add some unit tests.
2023-09-11 23:54:56 +03:00
Dirk-Jan C. Binnema e290158bcd query-xapianizer: map empty range queries to match-nothing
And only run Xapian tests if they are compatible with the version we
have.
2023-09-11 23:51:37 +03:00
Dirk-Jan C. Binnema af9eb36ca0 unit-tests: modernize
Use TempDir, join_paths etc.
2023-09-11 23:51:37 +03:00
Dirk-Jan C. Binnema 567bc001ef lib/doxyfile.in: remove
Not used any longer
2023-09-11 23:51:37 +03:00
Dirk-Jan C. Binnema 2357db5bf1 query-processor: only phrasify indexable terms 2023-09-11 23:51:37 +03:00
Dirk-Jan C. Binnema 8c5f92bacc query-xapianizer: improve testing coverage 2023-09-11 23:51:37 +03:00
Dirk-Jan C. Binnema f6dc1f7427 scanner: add more unit tests 2023-09-11 23:51:37 +03:00
Dirk-Jan C. Binnema 192c67262a lib: hide some code from coverage checking
Parts that are not easy / useful to unit-test
2023-09-11 23:51:37 +03:00
Dirk-Jan C. Binnema 85ad35bd8e utils/unbroken: avoid pre-C++20 compiler warning 2023-09-10 10:15:33 +03:00
Dirk-Jan C. Binnema c8568eecd4 utils/file: add basename/dirname helpers and use them 2023-09-10 10:15:28 +03:00
Dirk-Jan C. Binnema 53c7381929 lib: move index/ into main lib/
simplify things a bit
2023-09-10 08:55:25 +03:00
Dirk-Jan C. Binnema 3e5cec0d05 tests: update for new query parser / ngrams 2023-09-09 17:57:42 +03:00
Dirk-Jan C. Binnema 89ed21e0c5 lib: improve printability for some types
A little fmt pixie dust
2023-09-09 17:26:20 +03:00