From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-5.0 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 33B50203C2 for ; Thu, 21 Jul 2016 15:55:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753271AbcGUPzG (ORCPT ); Thu, 21 Jul 2016 11:55:06 -0400 Received: from mout.gmx.net ([212.227.15.18]:63519 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753147AbcGUPzE (ORCPT ); Thu, 21 Jul 2016 11:55:04 -0400 Received: from virtualbox ([37.24.142.100]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LmbVT-1arkuF3smZ-00aEhM; Thu, 21 Jul 2016 17:54:53 +0200 Date: Thu, 21 Jul 2016 17:54:10 +0200 (CEST) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: =?UTF-8?Q?Jakub_Nar=C4=99bski?= cc: Jeff Hostetler , git , Jeff King , Junio C Hamano Subject: Re: [PATCH v1 6/6] Unit tests for V2 porcelain status In-Reply-To: Message-ID: References: <1468966258-11191-1-git-send-email-jeffhost@microsoft.com> <1468966258-11191-7-git-send-email-jeffhost@microsoft.com> <578F9923.3000403@gmail.com> <578F9D2A.2030204@jeffhostetler.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1409685566-1469116451=:14111" X-Provags-ID: V03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 566BtoG Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1409685566-1469116451=:14111 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Hi, On Wed, 20 Jul 2016, Jakub Nar=C4=99bski wrote: > On 20 July 2016 at 17:47, Jeff Hostetler wrote: > > On 07/20/2016 11:30 AM, Jakub Nar=C4=99bski wrote: > >> W dniu 2016-07-20 o 00:10, Jeff Hostetler pisze: > >>> > >>> +test_expect_success pre_initial_commit_0 ' > >>> + printf "## branch: (initial) master\n" >expected && > >>> + printf "?? actual\n" >>expected && > >>> + printf "?? dir1/\n" >>expected && > >>> + printf "?? expected\n" >>expected && > >>> + printf "?? file_x\n" >>expected && > >>> + printf "?? file_y\n" >>expected && > >>> + printf "?? file_z\n" >>expected && > >> > >> Why not use heredoc syntax (cat <<\EOF), or prepare a file > >> with expected output in the testsuite? > > > > The tests involving renames needed to embed a tab character > > in the output and hiding a tab character in a heredoc seemed > > error prone. So to be consistent I made them all printf-style. >=20 > Ah, so that's the case for series of printf. I think in some other > cases the Git testsuite simply uses HT variable for the TAB > character. Yeah, it would be more pleasant to read =09echo >expected <<-EOF =09## branch: (initial) master =09?? actual =09?? dir1/ =09?? expected =09?? file_x =09?? file_y =09?? file_z =09EOF And it is also easy to use $HT in there (unless you want to use <<-\EOF). Actually, even if you want to use \EOF, you can easily use `sed` to expand, say, "Q" to tabs, such as was done here: =09https://github.com/git/git/blob/v2.9.2/t/t4213-log-tabexpand.sh#L88-L92 Ciao, Dscho --8323329-1409685566-1469116451=:14111--