]> git.notmuchmail.org Git - notmuch/blobdiff - test/T395-ruby.sh
test: only accept short and long options, not silly in-betweens
[notmuch] / test / T395-ruby.sh
index d5cade8fbecd7d5ddd4a5c71f1f65470861703b7..20e06917fa3f2616750910f4ea58e0fa8b51ad1a 100755 (executable)
@@ -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