diff options
| author | Felipe Contreras <felipe.contreras@gmail.com> | 2021-05-23 21:19:09 -0500 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-06-27 14:13:03 -0300 |
| commit | 814abafc3e4280de115d4bc0ac01f8d026a0a7f9 (patch) | |
| tree | b01da71f2624e56230e4cce756c01021ee6e3b72 /test | |
| parent | 6e7365fb2033d59d4040d20c1d05c0e652dfcc7b (diff) | |
ruby: add keyword arguments to db.query
That way we don't need pass them to the query object ourselves.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'test')
| -rwxr-xr-x | test/T395-ruby.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh index d36d4aff..e828efed 100755 --- a/test/T395-ruby.sh +++ b/test/T395-ruby.sh @@ -82,4 +82,22 @@ q.search_threads.each do |t| end EOF +test_begin_subtest "check sort argument" +notmuch search --sort=oldest-first --output=threads tag:inbox > EXPECTED +test_ruby <<"EOF" +q = db.query('tag:inbox', sort: Notmuch::SORT_OLDEST_FIRST) +q.search_threads.each do |t| + puts 'thread:%s' % t.thread_id +end +EOF + +test_begin_subtest "check exclude_tags argument" +notmuch search --output=threads --exclude=all tag:inbox > EXPECTED +test_ruby <<"EOF" +q = db.query('tag:inbox', exclude_tags: %w[deleted], omit_excluded: Notmuch::EXCLUDE_ALL) +q.search_threads.each do |t| + puts 'thread:%s' % t.thread_id +end +EOF + test_done |
