From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2A297429E53 for ; Mon, 27 Jun 2011 21:45:37 -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 YL2aFcl1bpvn for ; Mon, 27 Jun 2011 21:45:35 -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 A94C9429E4D for ; Mon, 27 Jun 2011 21:45:33 -0700 (PDT) Received: by mail-bw0-f53.google.com with SMTP id 12so4889638bwg.26 for ; Mon, 27 Jun 2011 21:45:33 -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=A+Pi8/REAN3huyptx+pedZJtQ8TMATjfZKAr+bJhLQoWvrxjqoRcfYxzyLbneiVocZ DXEpl2bXXIyN2zyR3slCuZTiZw43O3nyPA3m47u+D/zIotQYEDy+wAy55crpfIZDOy2a kN0qwwQlcjxVMA/qkhl+s1Rmel0exhELldKkk= 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=iqVrxcfYuH1xgh0xu19+g8fndnD7IxBOGOr6h1Bjm53tKOAzhD5jJfci+ldz6gbBSg aNwljU9GdCmnNWAqyxnJJ+Ph7ZPAvxWeouwct/UeLs0qoYVNWZhl4jF+Xlwby7oPk6gM TDPkBUEuHLSqOxHAtVrosUUFrH7WIy5HOzITY= Received: by 10.205.65.4 with SMTP id xk4mr5363938bkb.21.1309236333364; Mon, 27 Jun 2011 21:45:33 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id k16sm4750752bks.1.2011.06.27.21.45.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 27 Jun 2011 21:45:32 -0700 (PDT) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH 03/10] test: cleanup test_emacs Date: Tue, 28 Jun 2011 08:45:04 +0400 Message-Id: <1309236311-2162-3-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1309236311-2162-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1309236311-2162-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: Tue, 28 Jun 2011 04:45:37 -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