From: Junio C Hamano Date: Mon, 09 Aug 2010 16:25:15 GMT Subject: Re: [PATCH 2/2] test-lib: user-friendly alternatives to test [!] [-d|-f] Message-ID: <7vvd7j7nys.fsf@alter.siamese.dyndns.org> In-Reply-To: <1281027281-21055-2-git-send-email-Matthieu.Moy@imag.fr> Matthieu Moy writes: > + test_file_must_not_exist [] > + test_dir_must_not_exist [] Should either of these pass? mkdir foo && test_file_must_not_exist foo rm -fr foo && >foo && test_dir_must_not_exist foo I think in most of the test cases we want to write "must not exist" to make sure what we are supposed to remove is gone, which would mean that (1) we know what that thing is, and (2) we not only just do not want a file "foo" when we say "file-must-not-exist foo", but we don't expect it to be a directory either. I'd say we would probably want three primitives instead of four: test_path_is_file test_path_is_directory test_path_is_missing Thanks.