Commit graph

11 commits

Author SHA1 Message Date
David Bremner
78e6cf12c0 test: fix deprecation warning in symbol-test
Reduce the amount of noise in the build log.
2022-01-16 15:37:14 -04:00
Daniel Kahn Gillmor
bdc87f0d3e test: run uncrustify
This is the result of running:

    $ uncrustify --replace --config ../devel/uncrustify.cfg *.cc *.c *.h

in the test directory.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-06-29 21:18:15 +02:00
Jani Nikula
19ea288679 test: check argc in symbol-test
Check argc mainly to fix unused parameter warning:

test/symbol-test.cc:7:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
  int main(int argc, char** argv) {
               ^

This makes more sense than telling the compiler it's unused on
purpose.
2015-09-24 07:28:51 -03:00
Jani Nikula
1008fc45da test: fix whitespace/indentation in symbol-test
Not of much consequence, but makes it nicer to do further edits.
2015-09-07 09:28:18 -03:00
David Bremner
32fd74b7aa lib: reject relative paths in n_d_{create,open}_verbose
There are many places in the notmuch code where the path is assumed to be absolute. If someone (TM) wants a project, one could remove these assumptions. In the mean time, prevent users from shooting themselves in the foot.

Update test suite mark tests for this error as no longer broken, and
also convert some tests that used relative paths for nonexistent
directories.
2015-06-12 07:34:50 +02:00
David Bremner
2e9ecb611a test: be consistent about spelling `nonexistent'
Apparently most of the misspellings are my fault.
2015-04-08 23:43:55 +09:00
David Bremner
84d3b15d25 lib: add "verbose" versions of notmuch_database_{open,create}
The compatibility wrapper ensures that clients calling
notmuch_database_open will receive consistent output for now.

The changes to notmuch-{new,search} and test/symbol-test are just to
make the test suite pass.

The use of IGNORE_RESULT is justified by two things. 1) I don't know
what else to do.  2) asprintf guarantees the output string is NULL if
an error occurs, so at least we are not passing garbage back.
2015-03-29 00:34:15 +01:00
Austin Clements
5fddc07dc3 lib/cli: Make notmuch_database_open return a status code
It has been a long-standing issue that notmuch_database_open doesn't
return any indication of why it failed.  This patch changes its
prototype to return a notmuch_status_t and set an out-argument to the
database itself, like other functions that return both a status and an
object.

In the interest of atomicity, this also updates every use in the CLI
so that notmuch still compiles.  Since this patch does not update the
bindings, the Python bindings test fails.
2012-05-05 10:11:57 -03:00
Amadeusz Żołnowski
0da10aa1bc Whitespaces cleanup. 2011-11-26 09:21:04 -08:00
Amadeusz Żołnowski
071456e5e6 Fix warnings for test/symbol-test.cc. 2011-11-26 09:20:47 -08:00
David Bremner
fba968dbfa tests: add a test for symbol hiding side effects
The worry here is that a binary linking with libnotmuch might lose
access to Xapian::Error symbols because libnotmuch hides them.

We are careful here to create ./fakedb/.notmuch in order to trigger a
Xapian exception, and not just a missing file check.

Thanks to jrollins and amddragon for suggestions.
(cherry picked from commit 66f37f5f6864a988f94ddb893e3a176af57f6c8e)
2011-06-23 07:05:25 -03:00