From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthieu Moy Subject: [PATCH v3] test-lib: user-friendly alternatives to test [-d|-f|-e] Date: Tue, 10 Aug 2010 13:18:48 +0200 Message-ID: <1281439128-12910-1-git-send-email-Matthieu.Moy@imag.fr> References: Cc: Matthieu Moy To: git@vger.kernel.org, gitster@pobox.com X-From: git-owner@vger.kernel.org Tue Aug 10 13:23:16 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OimvM-00080P-0H for gcvg-git-2@lo.gmane.org; Tue, 10 Aug 2010 13:23:16 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757513Ab0HJLXI (ORCPT ); Tue, 10 Aug 2010 07:23:08 -0400 Received: from imag.imag.fr ([129.88.30.1]:44082 "EHLO imag.imag.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757458Ab0HJLXG (ORCPT ); Tue, 10 Aug 2010 07:23:06 -0400 Received: from mail-veri.imag.fr (mail-veri.imag.fr [129.88.43.52]) by imag.imag.fr (8.13.8/8.13.8) with ESMTP id o7ABIotA029532 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Tue, 10 Aug 2010 13:18:50 +0200 (CEST) Received: from bauges.imag.fr ([129.88.43.5]) by mail-veri.imag.fr with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Oimr4-00008W-8R; Tue, 10 Aug 2010 13:18:50 +0200 Received: from moy by bauges.imag.fr with local (Exim 4.69) (envelope-from ) id 1Oimr4-0003Mu-6a; Tue, 10 Aug 2010 13:18:50 +0200 X-Mailer: git-send-email 1.7.2.1.52.g95e25.dirty In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (imag.imag.fr [129.88.30.1]); Tue, 10 Aug 2010 13:18:50 +0200 (CEST) X-IMAG-MailScanner-Information: Please contact MI2S MIM for more information X-IMAG-MailScanner: Found to be clean X-IMAG-MailScanner-SpamCheck: X-IMAG-MailScanner-From: moy@imag.fr Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: The helper functions are implemented, documented, and used in a few places to validate them, but not everywhere to avoid useless code churn. Signed-off-by: Matthieu Moy --- With Junio's comment and a typo noticed by Joshua Juran. t/README | 7 +++++++ t/t3404-rebase-interactive.sh | 18 +++++++++--------- t/t3407-rebase-abort.sh | 6 +++--- t/test-lib.sh | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 12 deletions(-) diff --git a/t/README b/t/README index 0d1183c..410499a 100644 --- a/t/README +++ b/t/README @@ -467,6 +467,13 @@ library for your script to use. file. This behaves like "cmp" but produces more helpful output when the test is run with "-v" option. + - test_path_is_file [] + test_path_is_dir [] + test_path_is_missing [] + + Check whether a file/directory exists or doesn't. will + be displayed if the test fails. + - test_when_finished