path: root/t/
AgeCommit message (Collapse)Author
2018-10-23t2000: rename and combine checkout clash testsStephen P. Smith
In an earlier patch some tests scripts were renamed and a naming convention was documented. [1] Merge and into [1] f50c9f76c ("Rename some test scripts and describe the naming convention", 2005-05-15) Signed-off-by: Stephen P. Smith <> Signed-off-by: Junio C Hamano <>
2009-08-18check_path(): allow symlinked directories to checkout-index --prefixJunio C Hamano
Merlyn noticed that Documentation/ no longer correctly removes old installed documents when the target directory has a leading path that is a symlink. It turns out that "checkout-index --prefix" was broken by recent b6986d8 (git-checkout: be careful about untracked symlinks, 2009-07-29). I suspect has_symlink_leading_path() could learn the third parameter (prefix that is allowed to be symlinked directories) to allow us to retire a similar function has_dirs_only_path(). Another avenue of fixing this I considered was to get rid of base_dir and base_dir_len from "struct checkout", and instead make "git checkout-index" when run with --prefix mkdir the leading path and chdir in there. It might be the best longer term solution to this issue, as the base_dir feature is used only by that rather obscure codepath as far as I know. But at least this patch should fix this breakage. Signed-off-by: Junio C Hamano <>
2008-07-13t/: Use "test_must_fail git" instead of "! git"Stephan Beyer
This patch changes every occurrence of "! git" -- with the meaning that a git call has to gracefully fail -- into "test_must_fail git". This is useful to - make sure the test does not fail because of a signal, e.g. SIGSEGV, and - advertise the use of "test_must_fail" for new tests. Signed-off-by: Stephan Beyer <> Signed-off-by: Junio C Hamano <>
2008-02-02Sane use of test_expect_failureJunio C Hamano
Originally, test_expect_failure was designed to be the opposite of test_expect_success, but this was a bad decision. Most tests run a series of commands that leads to the single command that needs to be tested, like this: test_expect_{success,failure} 'test title' ' setup1 && setup2 && setup3 && what is to be tested ' And expecting a failure exit from the whole sequence misses the point of writing tests. Your setup$N that are supposed to succeed may have failed without even reaching what you are trying to test. The only valid use of test_expect_failure is to check a trivial single command that is expected to fail, which is a minority in tests of Porcelain-ish commands. This large-ish patch rewrites all uses of test_expect_failure to use test_expect_success and rewrites the condition of what is tested, like this: test_expect_success 'test title' ' setup1 && setup2 && setup3 && ! this command should fail ' test_expect_failure is redefined to serve as a reminder that that test *should* succeed but due to a known breakage in git it currently does not pass. So if git-foo command should create a file 'bar' but you discovered a bug that it doesn't, you can write a test like this: test_expect_failure 'git-foo should create bar' ' rm -f bar && git foo && test -f bar ' This construct acts similar to test_expect_success, but instead of reporting "ok/FAIL" like test_expect_success does, the outcome is reported as "FIXED/still broken". Signed-off-by: Junio C Hamano <>
2007-07-03Rewrite "git-frotz" to "git frotz"Junio C Hamano
This uses the remove-dashes target to replace "git-frotz" to "git frotz". Signed-off-by: Junio C Hamano <>
2007-06-07War on whitespaceJunio C Hamano
This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <>
2005-09-08Big tool rename.Junio C Hamano
As promised, this is the "big tool rename" patch. The primary differences since 0.99.6 are: (1) git-*-script are no more. The commands installed do not have any such suffix so users do not have to remember if something is implemented as a shell script or not. (2) Many command names with 'cache' in them are renamed with 'index' if that is what they mean. There are backward compatibility symblic links so that you and Porcelains can keep using the old names, but the backward compatibility support is expected to be removed in the near future. Signed-off-by: Junio C Hamano <>
2005-05-14Rename some test scripts and describe the naming conventionPetr Baudis
First digit: "family", e.g. the absolute basics and global stuff (0), the basic db-side commands (read-tree, write-tree, commit-tree), the basic working-tree-side commands (checkout-cache, update-cache), the other basic commands (ls-files), the diff commands, the pull commands, exporting commands, revision tree commands... Second digit: the particular command we are testing Third digit: (optionally) the particular switch or group of switches we are testing Freeform part: commandname-details Described in the README. mv mv mv mv mv