aboutsummaryrefslogtreecommitdiff
path: root/test/T395-ruby.sh
AgeCommit message (Collapse)Author
2023-07-21test: support testing notmuch as installedDavid Bremner
We put some effort into testing the built copy rather than some installed copy. On the other hand for people like packagers, testing the installed copy is also of interest. When NOTMUCH_TEST_INSTALLED is set to a nonempty value, tests do not require a built notmuch tree or running configure. Some of the tests marked as broken when running against installed notmuch are probably fixable.
2023-03-31ruby: database: make path arg optionalFelipe Contreras
It can be automatically loaded from the configuration now. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-06-27ruby: add keyword arguments to db.queryFelipe Contreras
That way we don't need pass them to the query object ourselves. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-23ruby: use notmuch_exclude_t enumFelipe Contreras
It exists since 2013, let's allow it to be used in Ruby. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-05test: ruby: simplify output comparisonFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-05test: ruby: don't use instance variablesFelipe Contreras
Local variables are perfectly fine. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-05test: ruby: use much more standard Ruby idiomsFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: ruby: use much more standard putsFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: ruby: simplify test_ruby()Felipe Contreras
We always do test_expect_equal_file, so do it in test_ruby() directly. The only subtest where we don't (get non-existent file) can be easily modified. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: ruby: simplify MAIL_DIR initializationFelipe Contreras
There's no need to complicate the script passing the MAIL_DIR environment variable. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: ruby: simplify MAIL_DIR checkFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: ruby: refactor test_ruby()Felipe Contreras
There's no point in repeating the same initialization in all the tests. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: move test_ruby() inside the only clientFelipe Contreras
Not much point in polluting the main library, and also will be useful to modify it in tandem with the tests. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
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-04-06test: standardize argument order to test_expect_equal_fileDavid Bremner
It is annoying to debug failing tests when the interpretation of the diffs is reversed for some tests.
2016-05-19ruby: add bindings for `notmuch_database_get_all_tags`Ludovic LANGE
The Ruby bindings were missing a way to get all the tags of the database. Now you should be able to access this with the public instance method `all_tags` of your database object. Example of use: notmuchdb = Notmuch::Database.new path, { :create => false, :mode => Notmuch::MODE_READ_ONLY } my_tags = notmuchdb.all_tags my_tags.each { |tag| print tag } my_tags.destroy! Amended by db: improve error reporting, add test
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.
2015-06-14test: add initial ruby testsDavid Bremner
This is pretty much a line by line translation of the existing python tests, with two new tests for the count API.