From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Shumkin Subject: [PATCH v10 4/5] t6006 (rev-list-format): add tests for "%b" and "%s" for the case i18n.commitEncoding is not set Date: Fri, 5 Jul 2013 16:01:49 +0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: John Keeping , Johannes Sixt , Alexey Shumkin , Junio C Hamano To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Fri Jul 05 14:02:29 2013 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 1Uv4iZ-0004To-Ko for gcvg-git-2@plane.gmane.org; Fri, 05 Jul 2013 14:02:28 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757337Ab3GEMCQ convert rfc822-to-quoted-printable (ORCPT ); Fri, 5 Jul 2013 08:02:16 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:47563 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757250Ab3GEMCH (ORCPT ); Fri, 5 Jul 2013 08:02:07 -0400 Received: by mail-lb0-f170.google.com with SMTP id t13so2000591lbd.15 for ; Fri, 05 Jul 2013 05:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:mime-version:content-type :content-transfer-encoding; bh=z858TlBOWWaspo2Qmng7wsUxaY/+z11IH7KTR+O8XEc=; b=X9dralYxVaejGWacdvkFGluYp3XbOeKiv7fI7At7uxoj73LO8FD67uxxwefIcanWjn Zmd1coE9DZACVIbH12AL/lMRkBLK9rXWSlkpjJgT1WQU45uzB/OVUrjtlyrhw2kTlG3s wnXgda07I9rSTrnpW+QESMq4YNsWhT+bvaFnfXneQDpt8iPDLKm6riU9F5xq99cb2Jsj ToZXZDCW2bpluWQTa+mRIJlWaxNM2osQ76rVdMu7OsbeIqbKHPp4/1FJPJFd6iD9I2N5 DlXB4R262TjFQ6zsr5Yz8PktxS1syQchzibxSp4I/JkApfxQS3U/3MhWuhrQgPIHrfXv mVXQ== X-Received: by 10.112.198.10 with SMTP id iy10mr5432630lbc.38.1373025726390; Fri, 05 Jul 2013 05:02:06 -0700 (PDT) Received: from localhost ([85.21.218.130]) by mx.google.com with ESMTPSA id x8sm2755354lae.10.2013.07.05.05.02.05 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 05 Jul 2013 05:02:05 -0700 (PDT) X-Mailer: git-send-email 1.8.3.2.16.gb1f0d63 In-Reply-To: In-Reply-To: References: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: In de6029a (pretty: Add failing tests: --format output should honor logOutputEncoding, 2013-06-26) 'complex-subject' test was changed. Revert it back, because that change actually removed tests for "%b" and "%s" with i18n.commitEncoding set. Also, add two more tests for mentioned above "%b" and "%s" to test encoding conversions with no i18n.commitEncoding set. Signed-off-by: Alexey Shumkin Suggested-by: Johannes Sixt --- t/t6006-rev-list-format.sh | 41 ++++++++++++++++++++++++++++----------= --- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh index b32405a..e51d0f0 100755 --- a/t/t6006-rev-list-format.sh +++ b/t/t6006-rev-list-format.sh @@ -218,12 +218,7 @@ test_expect_success 'setup complex body' ' git config i18n.commitencoding iso8859-1 && echo change2 >foo && git commit -a -F commit-msg && head3=3D$(git rev-parse --verify HEAD) && - head3_short=3D$(git rev-parse --short $head3) && - # unset commit encoding config - # otherwise %e does not print encoding value - # and following test fails - git config --unset i18n.commitEncoding - + head3_short=3D$(git rev-parse --short $head3) ' =20 test_format complex-encoding %e <expected.utf-8 && + commit $head3 + This commit message is much longer than the others, + and it will be encoded in iso8859-1. We should therefore + include an iso8859 character: =C2=A1bueno! + + commit $head2 + commit $head1 +EOF + iconv -f utf-8 -t iso8859-1 expected.utf-8 >expected.iso8859-1 +' + +test_format complex-body %b expect commit $head3 && echo >>expect fooQbar && --=20 1.8.3.2.16.gb1f0d63