From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthieu Moy Subject: [PATCH 2/2] test-lib: user-friendly alternatives to test [-d|-f|-e] Date: Tue, 10 Aug 2010 17:17:52 +0200 Message-ID: <1281453472-29835-2-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 17:22:15 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 1Oiqec-0002JC-Sj for gcvg-git-2@lo.gmane.org; Tue, 10 Aug 2010 17:22:15 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757612Ab0HJPWK (ORCPT ); Tue, 10 Aug 2010 11:22:10 -0400 Received: from imag.imag.fr ([129.88.30.1]:61498 "EHLO imag.imag.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754860Ab0HJPWI (ORCPT ); Tue, 10 Aug 2010 11:22:08 -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 o7AFHtBZ000141 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Tue, 10 Aug 2010 17:17:55 +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 1OiqaR-0002hK-Gk; Tue, 10 Aug 2010 17:17:55 +0200 Received: from moy by bauges.imag.fr with local (Exim 4.69) (envelope-from ) id 1OiqaR-0007mu-Fk; Tue, 10 Aug 2010 17:17:55 +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 17:17:55 +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 --- Just resending this one since I modified PATCH 1/2 and had to resolve a minor conflict. 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