From patchwork Tue Oct 22 10:20:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denton Liu X-Patchwork-Id: 11204205 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3473139A for ; Tue, 22 Oct 2019 10:20:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B21172184C for ; Tue, 22 Oct 2019 10:20:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ooxl0b+s" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731801AbfJVKUO (ORCPT ); Tue, 22 Oct 2019 06:20:14 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41881 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727101AbfJVKUO (ORCPT ); Tue, 22 Oct 2019 06:20:14 -0400 Received: by mail-pg1-f195.google.com with SMTP id t3so9658561pga.8 for ; Tue, 22 Oct 2019 03:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=a6QSvPox0audVTemUdwMvQrKuSMXve+4jCu/Zwy9rX8=; b=ooxl0b+sxtgyJQf+WpFG8I14Rgt/d1yZPmyPRwmy4myYxj0UQlEMKxr21Mvl8MKJav Ik7iJKxmPM3/GuQvOeOkgc4zEcLAQGFzBfvgsjoLiaZvy4EQZGsBY3w27n6UhguOwItE i8q+kXpIiIHLZiRWjd46BCkV0Lua43L3CZ98kpqbwFZmaqFFs+YoHOxOFgfu34rlZ6Qq 1GhUuf53At+bQBbGZQX3c026wK+VtNeUdcX+y0vsJwWreCHLUmno6yflZPeZ6L5m5Pgo 6CFvzv/Qe+M2AyhI19i59QQY4A+VLA7mANTtkKZpYKlU1KaUVn0PcJO9Wqyo6JsLxC8a V3Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=a6QSvPox0audVTemUdwMvQrKuSMXve+4jCu/Zwy9rX8=; b=lIDLxfXFl0MBxNe+TgvOFUiKMja7W7Bs5aGMtEeUE3A/SzK2aqJc3g9LBBY8tTsxY9 MliwntefxjGXXnkreDpw0ZFbfqw2rJPZy9EiF+iOruT5lx2+afHxjRHyMywtULvHsiHF f4/HF4FWjWJGLEQyX6OYggX6FGS1/L5ohqaTkOiMDwVE5a/RJVZY+W9tjF47uLr8MBEe o9atCvZhzvJwv0lhAU4aLcgiMBj5qiqZ0Nt5LAyqg/nMwwfbNHFOjp8VvmTaq9WsWSVv KK5BX7RbF5cY7T8NAI0u6Bkqj8IyS9RnzMXsMgnlSpFENpS6X2h2+STaCJEGjC4ar/xl Ojew== X-Gm-Message-State: APjAAAU+Ig2fmU9gB+B+oShMVK7zkzAMJ8SB2+CLqMJBFUa/bPYzkyqJ WbI+ZRDYIKso+V9+P9XpkoFa/pTs X-Google-Smtp-Source: APXvYqwFR7CSjGRucmL4hLq9qXec5LDxUvZxokGSPBoXoPapTY1vEFuh8ls4OlYhf+el21lLCdLRJg== X-Received: by 2002:aa7:9907:: with SMTP id z7mr3371772pff.133.1571739613380; Tue, 22 Oct 2019 03:20:13 -0700 (PDT) Received: from generichostname ([2601:646:280:1b30:80db:d816:4d15:ae2a]) by smtp.gmail.com with ESMTPSA id f21sm16242949pgh.85.2019.10.22.03.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 03:20:12 -0700 (PDT) Date: Tue, 22 Oct 2019 03:20:10 -0700 From: Denton Liu To: Git Mailing List Cc: Eric Sunshine , Johannes Sixt , SZEDER =?utf-8?b?R8OhYm9y?= Subject: [PATCH v3 07/14] t5520: use test_line_count where possible Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.2 (2019-09-21) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Instead of rolling our own functionality to test the number of lines a command outputs, use test_line_count() which provides better debugging information in the case of a failure. Signed-off-by: Denton Liu --- t/t5520-pull.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 7bb9031140..0ca4867e96 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -699,7 +699,8 @@ test_expect_success 'git pull --rebase does not reapply old patches' ' ( cd dst && test_must_fail git pull --rebase && - test 1 = $(find .git/rebase-apply -name "000*" | wc -l) + find .git/rebase-apply -name "000*" >patches && + test_line_count = 1 patches ) '