[PATCH 4/9] test: ruby: simplify MAIL_DIR initialization

Subject: [PATCH 4/9] test: ruby: simplify MAIL_DIR initialization

Date: Sat, 1 May 2021 06:59:18 -0500

To: notmuch@notmuchmail.org

Cc: Daniel Kahn Gillmor, Ludovic LANGE, Tomi Ollila, Stefano Zacchiroli

From: Felipe Contreras


There's no need to complicate the script passing the MAIL_DIR
environment variable.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 test/T395-ruby.sh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
index 94fab106..67d6e205 100755
--- a/test/T395-ruby.sh
+++ b/test/T395-ruby.sh
@@ -10,13 +10,12 @@ add_email_corpus
 
 test_ruby() {
     (
-	cat <<-\EOF
+	cat <<-EOF
 	require 'notmuch'
-	$maildir = ENV['MAIL_DIR'] || abort('MAIL_DIR not set')
-	@db = Notmuch::Database.new($maildir)
+	@db = Notmuch::Database.new('$MAIL_DIR')
 	EOF
 	cat
-    ) | MAIL_DIR=$MAIL_DIR $NOTMUCH_RUBY -I "$NOTMUCH_BUILDDIR/bindings/ruby"> OUTPUT
+    ) | $NOTMUCH_RUBY -I "$NOTMUCH_BUILDDIR/bindings/ruby"> OUTPUT
 }
 
 test_begin_subtest "compare thread ids"
-- 
2.31.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: