[PATCH 2/5] test: cleanup test_emacs
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Sun, 26 Jun 2011 23:52:56 +0000 (03:52 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:43 +0000 (09:38 -0800)
ae/d66629122bad5715546b23643ffbade530be7d [new file with mode: 0644]

diff --git a/ae/d66629122bad5715546b23643ffbade530be7d b/ae/d66629122bad5715546b23643ffbade530be7d
new file mode 100644 (file)
index 0000000..fad23b9
--- /dev/null
@@ -0,0 +1,117 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4E25A429E33\r
+       for <notmuch@notmuchmail.org>; Sun, 26 Jun 2011 16:53:21 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id t2qEyBAHXZLW for <notmuch@notmuchmail.org>;\r
+       Sun, 26 Jun 2011 16:53:20 -0700 (PDT)\r
+Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 87AB5429E2E\r
+       for <notmuch@notmuchmail.org>; Sun, 26 Jun 2011 16:53:18 -0700 (PDT)\r
+Received: by mail-bw0-f53.google.com with SMTP id 12so3882788bwg.26\r
+       for <notmuch@notmuchmail.org>; Sun, 26 Jun 2011 16:53:18 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer\r
+       :in-reply-to:references;\r
+       bh=zNty+7Hr7Wp4ZzZwhOQ1cuXfQpD0XKItXnWwo38pN3c=;\r
+       b=lVZ8Wx0Apk/JUoNyqvRj49LbIce23cTtwhI+m/+yJYtBnyXhtEfO/6b585Ypj2HjCW\r
+       hQFkkdPpjHIkwr/TgNQ+vMulyBCFmon3f2HGUcrOR+/ULG23kTBD6/FLeOH3PFVoibA6\r
+       GHk+QlRaTZcHcKMvJaOrX/HYPq4ePSPCiwCfs=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       b=OwmdJU6EuiFSk5tbHUduU4jHungQjvxWvlYd9Rs1soM9gwMLdECzTor+SbeUqRvnxD\r
+       tvn7xQafGEGfcn5FOGIgFL5Z2O2zN1b8nQPadywMZGhbv0pGtcs4YWeVcV6+qglEI1HI\r
+       cDajgCenukKoNab2GmBBVizzZWlB5YDWjgd3U=\r
+Received: by 10.204.134.207 with SMTP id k15mr3932825bkt.135.1309132398191;\r
+       Sun, 26 Jun 2011 16:53:18 -0700 (PDT)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id g13sm1788582bkd.22.2011.06.26.16.53.16\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 26 Jun 2011 16:53:17 -0700 (PDT)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/5] test: cleanup test_emacs\r
+Date: Mon, 27 Jun 2011 03:52:56 +0400\r
+Message-Id: <1309132379-24089-2-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <1309132379-24089-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1309132379-24089-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 26 Jun 2011 23:53:22 -0000\r
+\r
+Move auxiliary function definition and configuration from command\r
+line to test-lib.el.\r
+---\r
+ test/test-lib.el |    8 ++++++++\r
+ test/test-lib.sh |    9 +--------\r
+ 2 files changed, 9 insertions(+), 8 deletions(-)\r
+\r
+diff --git a/test/test-lib.el b/test/test-lib.el\r
+index 9439996..344a02e 100644\r
+--- a/test/test-lib.el\r
++++ b/test/test-lib.el\r
+@@ -20,6 +20,14 @@\r
+ ;;\r
+ ;; Authors: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
\r
++;; avoid crazy 10-column default of --batch\r
++(set-frame-width (window-frame (get-buffer-window)) 80)\r
++\r
++(defun notmuch-test-wait ()\r
++  "Wait for process completion."\r
++  (while (get-buffer-process (current-buffer))\r
++    (sleep-for 0.1)))\r
++\r
+ (defun visible-buffer-string ()\r
+   "Same as `buffer-string', but excludes invisible text."\r
+   (visible-buffer-substring (point-min) (point-max)))\r
+diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+index 3ec388c..5f61960 100755\r
+--- a/test/test-lib.sh\r
++++ b/test/test-lib.sh\r
+@@ -852,18 +852,11 @@ fi\r
+ # --directory         Ensure that the local elisp sources are found\r
+ #\r
+ # --load              Force loading of notmuch.el and test-lib.el\r
+-#\r
+-# notmuch-test-wait   Function for tests to use to wait for process completion\r
+-#\r
+-# set-frame-width     80 columns (avoids crazy 10-column default of --batch)\r
\r
+ emacs \$BATCH --no-init-file --no-site-file \\r
+       --directory ../../emacs --load notmuch.el \\r
+       --directory .. --load test-lib.el \\r
+-      --eval "(defun notmuch-test-wait ()\r
+-                      (while (get-buffer-process (current-buffer))\r
+-                              (sleep-for 0.1)))" \\r
+-      --eval "(progn (set-frame-width (window-frame (get-buffer-window)) 80) \$@)"\r
++      --eval "(progn \$@)"\r
+ EOF\r
+       chmod a+x ./run_emacs\r
+       ./run_emacs "$@"\r
+-- \r
+1.7.5.4\r
+\r