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] Date: Thu, 5 Aug 2010 18:54:41 +0200 Message-ID: <1281027281-21055-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 Thu Aug 05 19:00:12 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 1Oh3ne-0008Fd-OU for gcvg-git-2@lo.gmane.org; Thu, 05 Aug 2010 19:00:11 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933807Ab0HEQ7q (ORCPT ); Thu, 5 Aug 2010 12:59:46 -0400 Received: from imag.imag.fr ([129.88.30.1]:59458 "EHLO imag.imag.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933796Ab0HEQ7n (ORCPT ); Thu, 5 Aug 2010 12:59:43 -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 o75Gsrwc008951 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 5 Aug 2010 18:54:54 +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 1Oh3iX-00058G-Kq; Thu, 05 Aug 2010 18:54:53 +0200 Received: from moy by bauges.imag.fr with local (Exim 4.69) (envelope-from ) id 1Oh3iX-0005UG-Jc; Thu, 05 Aug 2010 18:54:53 +0200 X-Mailer: git-send-email 1.7.2.1.30.g18195 In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (imag.imag.fr [129.88.30.1]); Thu, 05 Aug 2010 18:54:54 +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 --- t/README | 8 ++++++++ t/t3404-rebase-interactive.sh | 18 +++++++++--------- t/t3407-rebase-abort.sh | 6 +++--- t/test-lib.sh | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 12 deletions(-) diff --git a/t/README b/t/README index 0d1183c..be760b9 100644 --- a/t/README +++ b/t/README @@ -467,6 +467,14 @@ 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_file_must_exist [] + test_file_must_not_exist [] + test_dir_must_exist [] + test_dir_must_not_exist [] + + check whether a file/directory exists or doesn't. will + be displayed if the test fails. + - test_when_finished