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