aboutsummaryrefslogtreecommitdiff
path: root/test/T060-count.sh
AgeCommit message (Collapse)Author
2025-02-22test/count: convert library test from python to CDavid Bremner
The new python bindings do not support modifying query objects, so convert to C. There is a bit more boilerplate to handle errors but otherwise it is essentially a line by line translation.
2023-07-21test: treat undefined feature variables as 0David Bremner
When running the test suite without building first, it is desirable to have the tests consider these variables being undefined as equivalent to the feature not being present, and in particular for the tests not to generate errors.
2021-12-04test/count: replace use of gdb with a LD_PRELOAD shimDavid Bremner
There is a certain amount of boilerplate to pass the call on the original function, so abstract it out as a C preprocessor macro, plus some extra includes in notmuch-test.h
2021-09-04CLI/{count, dump, reindex, reply, show}: enable sexp queriesDavid Bremner
The change in each case is to call notmuch_query_create_with_syntax, relying on the already inherited shared options. As a bonus we get improved error handling from the new query creation API. The remaining subcommand is 'tag', which is a bit trickier.
2020-08-01test: drop use of db_endingDavid Bremner
This will allow the dropping of the test for the default ending from configure.
2017-10-20test: use $(dirname "$0") for sourcing test-lib.shJani Nikula
Don't assume the tests are always run from within the source tree.
2017-03-04lib: query make exclude handling non-destructiveDavid Bremner
We filter added exclude at add time, rather than modifying the query by count search. As noted in the comments, there are several ignored conditions here.
2017-01-08test: allow user to choose which gdb to run tests withTomi Ollila
The variable used for selecting gdb is TEST_GDB, consistent with TEST_CC and TEST_EMACS{,CLIENT}.
2016-10-15test: add known broken test for nondestructiveness of countDavid Bremner
Thanks to Lucas (id:147263183913.27784.12274024193186585889@mbp) for the bug report and the test case. I decided to use the python version because the python bindings could use more exercise.
2016-08-09test: make gdb even quieterDavid Bremner
gdb sometimes writes warnings to stdout, which we don't need/want, and for some reason --batch-silent isn't enough to hide. So in this commit we write them to a log file, which is probably better for debugging anyway. To see an illustrative test failure before this change, run % make % touch notmuch-count.c % cd test && ./T060-count.sh
2016-04-12test: cope with glass backend file naming variationsDavid Bremner
In several places in the test suite we intentionally corrupt the Xapian database in order to test error handling. This corruption is specific to the on-disk organization of the database, and that changed with the glass backend. We use the previously computed default backend to make the tests adapt to changing names.
2015-09-20cli/count: update to use notmuch_query_search_messages_stDavid Bremner
This brings back status information that may have been hidden by the great library logging conversion. Note the change of the internal API / return-value for count_files. The other count calls to the lib will also get error handling when that API is updated in the lib.
2015-08-07test: make script exit (1) if it "fails" to source (.) a fileTomi Ollila
The files (test) scripts source (with builtin command `.`) provides information which the scripts depend, and without the `source` to succeed allowing script to continue may lead to dangerous situations (e.g. rm -rf "${undefined_variable}"/*). At the end of all source (.) lines construct ' || exit 1' was added; In our case the script script will exit if it cannot find (or read) the file to be sourced. Additionally script would also exits if the last command of the sourced file exited nonzero.
2014-01-13test: renamed test scripts to format T\d\d\d-name.shTomi Ollila
All test scripts to be executed are now named as T\d\d\d-name.sh, numers in increments of 10. This eases adding new tests and developers to see which are test scripts that are executed by test suite and in which order.