X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT395-ruby.sh;h=d0c6bb17bdda217e1e4aff594f77592fa04636d8;hb=HEAD;hp=e828efed3dbe4bca31ccf0f134c560b021cea928;hpb=3df2281746d57abbb45790ecb432ef40533c30bc;p=notmuch diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh index e828efed..d0c6bb17 100755 --- a/test/T395-ruby.sh +++ b/test/T395-ruby.sh @@ -2,7 +2,7 @@ test_description="ruby bindings" . $(dirname "$0")/test-lib.sh || exit 1 -if [ "${NOTMUCH_HAVE_RUBY_DEV}" = "0" ]; then +if [ -z "${NOTMUCH_TEST_INSTALLED-}" -a "${NOTMUCH_HAVE_RUBY_DEV-0}" = "0" ]; then test_subtest_missing_external_prereq_["ruby development files"]=t fi @@ -12,10 +12,14 @@ test_ruby() { ( cat <<-EOF require 'notmuch' - db = Notmuch::Database.new('$MAIL_DIR') + db = Notmuch::Database.new() EOF cat - ) | $NOTMUCH_RUBY -I "$NOTMUCH_BUILDDIR/bindings/ruby"> OUTPUT + ) | if [ -n "${NOTMUCH_TEST_INSTALLED-}" ]; then + ruby + else + $NOTMUCH_RUBY -I "$NOTMUCH_BUILDDIR/bindings/ruby" + fi> OUTPUT test_expect_equal_file EXPECTED OUTPUT }