From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Hommey Subject: [PATCH] Fix t7004 which fails with retarded sed Date: Fri, 16 Nov 2007 18:26:11 +0100 Message-ID: <1195233971-12288-1-git-send-email-mh@glandium.org> References: <20071116165944.GB29272@glandium.org> Cc: Junio C Hamano To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Fri Nov 16 18:27:43 2007 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1It4yT-00058W-At for gcvg-git-2@gmane.org; Fri, 16 Nov 2007 18:27:25 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755012AbXKPR1H (ORCPT ); Fri, 16 Nov 2007 12:27:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754427AbXKPR1G (ORCPT ); Fri, 16 Nov 2007 12:27:06 -0500 Received: from vawad.err.no ([85.19.200.177]:45885 "EHLO vawad.err.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754590AbXKPR1F (ORCPT ); Fri, 16 Nov 2007 12:27:05 -0500 Received: from aputeaux-153-1-42-198.w82-124.abo.wanadoo.fr ([82.124.6.198] helo=namakemono.glandium.org) by vawad.err.no with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.62) (envelope-from ) id 1It4y3-0002h6-7V; Fri, 16 Nov 2007 18:27:01 +0100 Received: from mh by namakemono.glandium.org with local (Exim 4.68) (envelope-from ) id 1It4xH-0003CY-O9; Fri, 16 Nov 2007 18:26:12 +0100 X-Mailer: git-send-email 1.5.3.5 In-Reply-To: <20071116165944.GB29272@glandium.org> X-Spam-Status: (score 5.0): Status=No hits=4.9 required=5.0 tests=RCVD_IN_DSBL,RCVD_IN_SORBS_DUL version=3.1.4 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Brown paper bag fix to avoid test failure with retarded sed. The test by itself didn't catch what it was supposed to, anyways. So now, we test whether the editor gets at least an empty line, some commented lines, and doesn't get anything else. Signed-off-by: Mike Hommey --- t/t7004-tag.sh | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 096fe33..3813f23 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -1007,7 +1007,9 @@ test_expect_failure \ test_expect_success \ 'message in editor has initial comment' ' GIT_EDITOR=cat git tag -a initial-comment > actual || true && - test $(sed -n "/^\(#\|\$\)/p" actual | wc -l) -gt 0 + grep -e "^$" actual > /dev/null 2>&1 && + grep -e "^#" actual > /dev/null 2>&1 && + ! grep -e "^[^#]" actual > /dev/null 2>&1 ' get_tag_header reuse $commit commit $time >expect -- 1.5.3.5