]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
test: redirect STDIN from /dev/null
[notmuch] / test / test-lib.sh
index f5d367aae2d71c161bd45a707b851b7c1a275221..7b49fc9799dac7ed371e4214193d74212cfb84da 100644 (file)
@@ -55,6 +55,9 @@ done,*)
        ;;
 esac
 
+# STDIN from /dev/null. EOF for readers (and ENOTTY for tty related ioctls).
+exec </dev/null
+
 # Save STDOUT to fd 6 and STDERR to fd 7.
 exec 6>&1 7>&2
 # Make xtrace debugging (when used) use redirected STDERR, with verbose lead:
@@ -326,7 +329,7 @@ emacs_deliver_message ()
        "(let ((message-send-mail-function 'message-smtpmail-send-it)
                (mail-host-address \"example.com\")
               (smtpmail-smtp-server \"localhost\")
-              (smtpmail-smtp-service \"25025\"))
+              (smtpmail-smtp-service \"${smtp_dummy_port}\"))
           (notmuch-mua-mail)
           (message-goto-to)
           (insert \"test_suite@notmuchmail.org\nDate: 01 Jan 2000 12:00:00 -0000\")