From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sverre Rabbelier Subject: Re: [PATCH] test-lib: make test_expect_code a test command Date: Fri, 1 Oct 2010 19:39:11 +0200 Message-ID: References: <7vd3rtholo.fsf@alter.siamese.dyndns.org> <1285953391-29840-1-git-send-email-avarab@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: git@vger.kernel.org, Junio C Hamano , Elijah Newren , Jonathan Nieder To: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= X-From: git-owner@vger.kernel.org Fri Oct 01 19:39:39 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P1ja6-00060T-IJ for gcvg-git-2@lo.gmane.org; Fri, 01 Oct 2010 19:39:38 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752666Ab0JARjd convert rfc822-to-quoted-printable (ORCPT ); Fri, 1 Oct 2010 13:39:33 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:64630 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751928Ab0JARjc convert rfc822-to-8bit (ORCPT ); Fri, 1 Oct 2010 13:39:32 -0400 Received: by iwn5 with SMTP id 5so4072980iwn.19 for ; Fri, 01 Oct 2010 10:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=6/Yxv12h810SbR/IXP+fadWbtxT4bRXmiUlPKin9bGI=; b=as3USAqrNVyRcm2+0yZWDkcRsVxtXOwisPdC/BjgJFc+h37lD+/uFEGbT+mg1b9+DK WHQIB6rM6Dp9ptx4ajbmVdeg0A36Ej8XsNa7cpBSSe5h53qor7tPeQB3lc88eWldwdrO jCK7cKVhXeTp7GMlYuC6aOktgYzwwC5zYFmqg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=LS/li5VqbY2YV6c8vT/ZiJaLJvVUDuA3LSFCwtARd8EsiZxf1Owdw7OXHOyTzQgFPo Hox7E0S7otybjGZl/bJW10ODlM7lrHXEEkCYJPxlg7WKXtBfzKz6UVLadpXGvAfTE88Y Bv3Yzvw6lfu7itshtsSx3FCdENYWzfr5JxYqw= Received: by 10.231.35.200 with SMTP id q8mr5963235ibd.191.1285954771789; Fri, 01 Oct 2010 10:39:31 -0700 (PDT) Received: by 10.231.33.138 with HTTP; Fri, 1 Oct 2010 10:39:11 -0700 (PDT) In-Reply-To: <1285953391-29840-1-git-send-email-avarab@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Heya, On Fri, Oct 1, 2010 at 19:16, =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason wrote: > converted that code to use an external test similar no the TODO test = I s/no/to/ > +cat >expect < +not ok - 1 tests clean up even after a failure > +# > +# =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0touch clean-after-failure && > +# =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0test_when_finished rm clean-afte= r-failure && > +# =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(exit 1) > +# > +not ok - 2 failure to clean up causes the test to fail > +# > +# =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0test_when_finished \"(exit 2)\" > +# > +# failed 2 among 2 test(s) > +1..2 > +EOF > + =C2=A0 =C2=A0test_cmp expect out) I still like the putting-the-code-in-a-separate-harness, but I'm wondering if we can't come up with something better than comparing with test output that could change in the future... unless we decide to standardize on TAP and not deviate from it? Either case, wouldn't it at least be a good idea to get rid of the parts after the # in the comparrison? --=20 Cheers, Sverre Rabbelier