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 C266A431FAF for ; Thu, 19 Jan 2012 01:59:25 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 DGJYwrD8ydrB for ; Thu, 19 Jan 2012 01:59:25 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D9C6B431FAE for ; Thu, 19 Jan 2012 01:59:24 -0800 (PST) Received: by wgbdt12 with SMTP id dt12so703898wgb.2 for ; Thu, 19 Jan 2012 01:59:23 -0800 (PST) Received: by 10.180.95.199 with SMTP id dm7mr42883899wib.9.1326967163814; Thu, 19 Jan 2012 01:59:23 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id eq5sm16787460wib.2.2012.01.19.01.59.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Jan 2012 01:59:22 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id 8761E9FE3F; Thu, 19 Jan 2012 09:59:20 +0000 (GMT) To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH 2/3] test: Add `test_emacs_expect_t'. In-Reply-To: References: <87pqei327k.fsf@gmail.com> <1326809224-22673-1-git-send-email-dme@dme.org> <1326809224-22673-2-git-send-email-dme@dme.org> User-Agent: Notmuch/0.11+64~g42e8f66 (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Thu, 19 Jan 2012 09:59:16 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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: Thu, 19 Jan 2012 09:59:25 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 18 Jan 2012 16:55:59 +0200, Tomi Ollila wrote: > > + # Report success/failure. > > + if ! test_skip "$test_subtest_name" > > + then > > + if [ "$result" =3D=3D t ] >=20 > if [ "$result" =3D t ] >=20 > to be compatible with POSIX and consistent with rest code. I'm happy to change this. > > + test_failure_ "$test_subtest_name" "$(eval printf ${result})" >=20 > This added 'eval' made me investigate further... running=20 >=20 > emacsclient --eval '(print (concat "a" "b" "\t" "c" "\n" "z"))' >=20 > outputs "ab c\nz" (tab between 'ab' and 'c', quotes (") around > the whole output and newlines as "\n" (even '\r' is converted)). >=20 > If emacs tests run via test_emacs_expect_t wrote their output=20 > to ${output} directly above code could be much cleaner in many > places. Environment variable could be used for the file name. I'm reluctant to change this just to avoid calling eval. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8X6XQACgkQaezQq/BJZRbEtwCfZ/d6vTlUusa5YwUx0VOrWU7w nJoAnjxBjfNQho4/Uvb6MAmokuzU+eM6 =IHUl -----END PGP SIGNATURE----- --=-=-=--