From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthieu Moy Subject: [PATCH v2] test-lib: user-friendly alternatives to test [!] [-d|-f] Date: Thu, 5 Aug 2010 19:03:51 +0200 Message-ID: <1281027831-22739-1-git-send-email-Matthieu.Moy@imag.fr> References: <1281027281-21055-2-git-send-email-Matthieu.Moy@imag.fr> Cc: Matthieu Moy To: git@vger.kernel.org, gitster@pobox.com X-From: git-owner@vger.kernel.org Thu Aug 05 19:06:31 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 1Oh3ti-0006Zn-9W for gcvg-git-2@lo.gmane.org; Thu, 05 Aug 2010 19:06:26 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933434Ab0HERGS (ORCPT ); Thu, 5 Aug 2010 13:06:18 -0400 Received: from mx2.imag.fr ([129.88.30.17]:51545 "EHLO rominette.imag.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881Ab0HERGQ (ORCPT ); Thu, 5 Aug 2010 13:06:16 -0400 Received: from mail-veri.imag.fr (mail-veri.imag.fr [129.88.43.52]) by rominette.imag.fr (8.13.8/8.13.8) with ESMTP id o75H20ZX000612 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 5 Aug 2010 19:02:00 +0200 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 1Oh3rX-0005EC-L9; Thu, 05 Aug 2010 19:04:11 +0200 Received: from moy by bauges.imag.fr with local (Exim 4.69) (envelope-from ) id 1Oh3rX-0005vY-JM; Thu, 05 Aug 2010 19:04:11 +0200 X-Mailer: git-send-email 1.7.2.1.30.g18195 In-Reply-To: <1281027281-21055-2-git-send-email-Matthieu.Moy@imag.fr> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (rominette.imag.fr [129.88.30.17]); Thu, 05 Aug 2010 19:02:01 +0200 (CEST) X-IMAG-MailScanner-Information: Please contact MI2S MIM for more information X-MailScanner-ID: o75H20ZX000612 X-IMAG-MailScanner: Found to be clean X-IMAG-MailScanner-SpamCheck: X-IMAG-MailScanner-From: moy@imag.fr MailScanner-NULL-Check: 1281632522.00432@CUsuC+dYmYcdlN78j5b3ew 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 --- Sooooory, the first version was plain broken (the tests did not even pass anymore), forget it. This should be better. 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