path: root/t/
AgeCommit message (Collapse)Author
2013-06-21t6003: add --author-date-order testJunio C Hamano
Tweak the --topo/date-order test vector a bit and mark the author dates of two commits (a2 and a3) earlier than their own committer dates, making them much older than other commits that are made on parallel branches to simulate the case where a long running topic was rebased recently. They will show up as recent in the --date-order output due to their timestamps, but they appear a lot later in the --author-date-order output, even though their committer timestamp says otherwise. Signed-off-by: Junio C Hamano <>
2013-06-21topology tests: teach a helper to set author dates as wellJunio C Hamano
Introduce on_dates helper that is similar to on_committer_date but also sets the author date, not just the committer date. At this step, just set the same timestamp to the author date as the committer date, as no test looks at author date yet. Signed-off-by: Junio C Hamano <>
2013-06-21t6003: add --date-order testJunio C Hamano
The "--date-order" output is a slight twist of "--topo-order" in that commits from parallel histories are shown in their committer date order without an attempt to clump commits from a single line of history together like --topo-order does. Signed-off-by: Junio C Hamano <>
2013-06-21topology tests: teach a helper to take abbreviated timestampsJunio C Hamano
The on_committer_date helper in t/lib-t6000 is used in t6002 and t6003 with timestamps on a single day within a single minute (i.e. 1971-08-16 00:00) and the tests repeat this over and over. The actual value of the timestamp, however, does not matter very much; only their relative ordering does. Introduce another helper to expand only the suffix of the timestamp to a full timestamp to make the lines shorter, and use it in this helper. Also, because all the commits in the test are made with specific GIT_COMMITTER_DATE, stop unsetting it at the end of the helper. We'll be specifying the author timestamp to these test commits in a later patch, which will be helped with this change. Also remove a test that was commented-out from t6003; it used to test a commit with the same parent listed twice, which was allowed by mistake but was fixed long time ago. Signed-off-by: Junio C Hamano <>
2010-05-08Move to lib-*Ævar Arnfjörð Bjarmason
The naming of this test library conflicted with the recommendation in t/README's "Naming Tests" section. Signed-off-by: Ævar Arnfjörð Bjarmason <> Signed-off-by: Junio C Hamano <>
2008-08-17tests: use $TEST_DIRECTORY to refer to the t/ directoryJunio C Hamano
Many test scripts assumed that they will start in a 'trash' subdirectory that is a single level down from the t/ directory, and referred to their test vector files by asking for files like "../t9999/expect". This will break if we move the 'trash' subdirectory elsewhere. To solve this, we earlier introduced "$TEST_DIRECTORY" so that they can refer to t/ directory reliably. This finally makes all the tests use it to refer to the outside environment. With this patch, and a one-liner not included here (because it would contradict with what Dscho really wants to do): | diff --git a/t/ b/t/ | index 70ea7e0..60e69e4 100644 | --- a/t/ | +++ b/t/ | @@ -485,7 +485,7 @@ fi | . ../GIT-BUILD-OPTIONS | | # Test repository | -test="trash directory" | +test="trash directory/another level/yet another" | rm -fr "$test" || { | trap - exit | echo >&5 "FATAL: Cannot prepare test area" all the tests still pass, but we would want extra sets of eyeballs on this type of change to really make sure. [jc: with help from Stephan Beyer on http-push tests I do not run myself; credits for locating silly quoting errors go to Olivier Marin.] 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 <>
2005-12-27Fix bogus tests on rev-list output.Junio C Hamano
These tests seem to mean checking the output with expected result, but was not doing its handrolled test helper function. Also fix the guard to workaround wc output that have whitespace padding, which was broken but not exposed because the test was not testing it ;-). Signed-off-by: Junio C Hamano <>
2005-11-15Update topo-order test.Junio C Hamano
The recently we updated rev-list --topo-order to show the heads in date order, but we had a test that expected to see the old behaviour. Signed-off-by: Junio C Hamano <>
2005-10-11Use git-update-ref and git-symbolic-ref in testsJohannes Schindelin
This makes all tests pass on cygwin. Signed-off-by: Johannes Schindelin <> 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-07-07[PATCH] Prevent t6000 series from dropping useless sed.script in t/Junio C Hamano
The Makefile in the test suite directory considers any file matching t[0-9][0-9][0-9][0-9]-*.sh as the top-level test script to be executed. Unfortunately this was not documented, and the common test library, was named to match that pattern. This caused to be called from Makefile as the top-level program, causing it to leave t/sed.script file behind. Rename it to to prevent this, and document the naming convention a bit more clearly. Signed-off-by: Junio C Hamano <> Signed-off-by: Linus Torvalds <>
2005-07-07[PATCH] Write sed script directly into temp file, rather than a variableJon Seymour
When sed uses \n rather than ; as a separator (for BSD sed(1) compat), it is cleaner to use a file directly, rather than an environment variable containing \n characters. This change changes t/t6000 write to sed.script directly and changes the other tests to remove knowledge of sed.script. Signed-off-by: Jon Seymour <> Signed-off-by: Linus Torvalds <>
2005-07-07[PATCH] Add t/t6003 with some --topo-order testsJon Seymour
Signed-off-by: Jon Seymour <> Signed-off-by: Linus Torvalds <>