X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT395-ruby.sh;h=20e06917fa3f2616750910f4ea58e0fa8b51ad1a;hp=8b8e6d24db534b0c45bb88f11e2bb3856c5a78da;hb=13a59c4a8fc4ee418424e0b7ee4c8bbd5aae5da2;hpb=8cca886b10c5ec44f3214701c0c1e3c896d53d5c diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh index 8b8e6d24..20e06917 100755 --- a/test/T395-ruby.sh +++ b/test/T395-ruby.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description="ruby bindings" -. ./test-lib.sh +. ./test-lib.sh || exit 1 if [ "${NOTMUCH_HAVE_RUBY_DEV}" = "0" ]; then test_subtest_missing_external_prereq_["ruby development files"]=t @@ -83,4 +83,20 @@ EOF notmuch count --output=threads tag:inbox > EXPECTED test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "get all tags" +test_ruby <<"EOF" +require 'notmuch' +$maildir = ENV['MAIL_DIR'] +if not $maildir then + abort('environment variable MAIL_DIR must be set') +end +@db = Notmuch::Database.new($maildir) +@t = @db.all_tags() +for tag in @t do + print tag,"\n" +end +EOF +notmuch search --output=tags '*' > EXPECTED +test_expect_equal_file OUTPUT EXPECTED + test_done