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
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
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
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
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
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
David Edmondson
a8440bb258
mu: Fix "expected command" server error report
2023-09-12 08:37:10 +01: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
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
264bb092f0
support xapian ngrams
...
Xapian supports an "ngrams" option to help with languages/scripts
without explicit wordbreaks, such as Chinese / Japanese / Korean.
Add some plumbing for supporting this in mu as well. Experimental for
now.
2023-09-09 17:26:20 +03:00
Dirk-Jan C. Binnema
9c28c65d45
utils: handle "unbroken" scripts
...
Do not removing combining characters from scripts without explicit word
boundaries, such as those for CJK.
Reuse some Xapian code for that.
2023-09-09 11:40:36 +03:00
Dirk-Jan C. Binnema
77a8a67f6c
move lib/thirdparty to thirdparty/
2023-09-05 08:34:27 +03:00
Dirk-Jan C. Binnema
e1308a9b40
utils: small tweaks
2023-08-27 11:07:55 +03:00
Dirk-Jan C. Binnema
c1950ae0cb
mu-utils: support UTC in parse_date_time
...
Parsing dates known to be in UTC.
2023-08-21 18:29:21 +03:00
Dirk-Jan C. Binnema
15f08488d3
remove Mu::format, use mu_format
...
Use the new fmt-based formatting.
2023-08-19 20:04:50 +03:00
Dirk-Jan C. Binnema
11df0bedce
utils: add mu_print[ln] for ostreams
2023-08-11 19:57:00 +03:00
Dirk-Jan C. Binnema
7aa38d0b56
option/result: add "unwrap"
...
Sprinkle some more Rust on Option & Result
2023-08-09 23:24:47 +03:00
Dirk-Jan C. Binnema
4ecf386cda
utils-file: don't use regexp in join_paths
...
It's slow.
2023-08-06 16:19:43 +03:00
Dirk-Jan C. Binnema
27c07280b1
utils: replace time_to_string with fmt-based formatting
...
It's faster; make "mu find" ~5-10% faster, and removes some code we no
longer need.
2023-08-06 16:19:43 +03:00
Dirk-Jan C. Binnema
111e48efa3
utils: add expand_path (wordexp wrapper)
...
For expanding command-line options for shells that don't do that by themselves.
2023-08-03 22:47:27 +03:00
Dirk-Jan C. Binnema
33fd79a9f0
mu-regex: add multiline test
2023-07-30 00:50:45 +03:00
Dirk-Jan C. Binnema
3a38d6366a
mu-view: test locale to C for tests
2023-07-29 17:25:07 +03:00
Dirk-Jan C. Binnema
766d1849ff
test-utils: add TempTz, RAII temporary timezone
2023-07-29 16:39:08 +03:00
Dirk-Jan C. Binnema
1f0342a91f
mu-view: add unit-test
2023-07-28 19:43:46 +03:00
Dirk-Jan C. Binnema
dc29dc8395
html-to-text: add missing include <array>
2023-07-26 23:30:54 +03:00
Dirk-Jan C. Binnema
c06e765d13
html-to-text: be explicit with array type
...
clang in CI fails to deduce it, so let's help it a bit.
2023-07-26 23:24:29 +03:00
Dirk-Jan C. Binnema
56b8fad89e
utils: implement html-to-text
...
Implement a crude html-to-text scraper function, to extract plain text
from html messages, so we can use it for indexing.
2023-07-25 21:26:36 +03:00
Dirk-Jan C. Binnema
11c807f955
utils/readline: use fmt-based apis
2023-07-25 21:26:01 +03:00
Dirk-Jan C. Binnema
9580d11fef
utils/result: add std::move version of Err
...
Avoid a copy in some situations
2023-07-25 21:26:01 +03:00
Dirk-Jan C. Binnema
6ad5cccc53
store/index: and unit test for circular symlink
...
Check that we bail out early
2023-07-18 23:18:21 +03:00
Dirk-Jan C. Binnema
cf6c5a36d7
utils: rework running system commands
...
Use g_spawn and pass arguments, so we don't involve a shell that needs
escaping etc.
Improve error handling.
2023-07-18 20:19:27 +03:00
Dirk-Jan C. Binnema
6f69f5d482
utils/mu-regex: add move constructor
2023-07-11 22:54:01 +03:00
Dirk-Jan C. Binnema
cc65b8b401
utils: add some more helpers for test code
...
Creating and removing (temp) dirs, running mu commands.
2023-07-10 23:15:40 +03:00
Dirk-Jan C. Binnema
904f64aa03
utils/result: add "unwrap" convenience function
2023-07-10 23:15:40 +03:00
Dirk-Jan C. Binnema
31f0c40893
migrate to fmt-based logging in some more places
...
and improve logging.
2023-07-08 10:30:36 +03:00
Dirk-Jan C. Binnema
82235b9d49
fmt: more update to use new fmt-based APIs
2023-07-06 21:49:50 +03:00
Dirk-Jan C. Binnema
e48485cb58
sexp: use fmt for parsing_error
...
Should help with Apple clang build too.
2023-07-05 23:40:36 +03:00
Dirk-Jan C. Binnema
aed1395c53
lib/utils: update library paths
2023-07-05 23:14:34 +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