From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Sixt Subject: Re: [PATCHv4] rebase [-i --exec | -ix] ... Date: Sun, 10 Jun 2012 13:56:32 +0200 Message-ID: <4FD48B70.5080600@kdbg.org> References: <1339167235-2009-2-git-send-email-Lucien.Kong@ensimag.imag.fr> <1339325076-474-1-git-send-email-Lucien.Kong@ensimag.imag.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: git@vger.kernel.org, tboegi@web.de, Valentin Duperray , Franck Jonas , Thomas Nguy , Huynh Khoi Nguyen Nguyen , Matthieu Moy To: Lucien Kong X-From: git-owner@vger.kernel.org Sun Jun 10 13:56:54 2012 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SdglI-0000bA-TT for gcvg-git-2@plane.gmane.org; Sun, 10 Jun 2012 13:56:53 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753259Ab2FJL4u (ORCPT ); Sun, 10 Jun 2012 07:56:50 -0400 Received: from bsmtp.bon.at ([213.33.87.14]:14979 "EHLO bsmtp.bon.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751155Ab2FJL4g (ORCPT ); Sun, 10 Jun 2012 07:56:36 -0400 Received: from dx.sixt.local (unknown [93.83.142.38]) by bsmtp.bon.at (Postfix) with ESMTP id E18CB2C4003; Sun, 10 Jun 2012 13:57:48 +0200 (CEST) Received: from [IPv6:::1] (localhost [IPv6:::1]) by dx.sixt.local (Postfix) with ESMTP id 03D3619F37F; Sun, 10 Jun 2012 13:56:32 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0 In-Reply-To: <1339325076-474-1-git-send-email-Lucien.Kong@ensimag.imag.fr> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Am 10.06.2012 12:44, schrieb Lucien Kong: > +test_expect_success 'rebase -i --exec without shows error message and usage' ' > + git reset --hard execute && > + test_must_fail git rebase -i --exec 2>actual && > + sed '1d' actual >tmp && > + mv tmp actual && > + test_must_fail git rebase -h >expected && > + test_cmp expected actual && > + git checkout master > +' IMO, it is more important to check that the error message is present rather than whether the usage blurb is correct. But since the error is generated by the option parsing machinery, it is probably sufficient to check *only* for failure, and don't verify the output at all. Then change the headline of the text to the neutral test_expect_success 'rebase -i --exec without ' ' And, BTW, next time I point out that sed 'xy'... should be changed to sed -e "xy"... you review *ALL* sed commands you introduce, not just those that I point out, OK? And, BTW, when I point out that ...>expected && sed expect && mv expect expected should be ...>expect && sed expected, you extrapolate *yourself* that the same pattern applies even if the files are named "tmp" and "actual", OK? That's expected from thoughtful contributors. -- Hannes