diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t3510-cherry-pick-sequence.sh | 2 | ||||
-rwxr-xr-x | t/t4012-diff-binary.sh | 12 | ||||
-rwxr-xr-x | t/t5701-clone-local.sh | 10 | ||||
-rwxr-xr-x | t/t6200-fmt-merge-msg.sh | 36 | ||||
-rwxr-xr-x | t/t9501-gitweb-standalone-http-status.sh | 21 | ||||
-rwxr-xr-x | t/t9902-completion.sh | 2 |
6 files changed, 56 insertions, 27 deletions
diff --git a/t/t3510-cherry-pick-sequence.sh b/t/t3510-cherry-pick-sequence.sh index 97f3710700..f4e6450d6a 100755 --- a/t/t3510-cherry-pick-sequence.sh +++ b/t/t3510-cherry-pick-sequence.sh @@ -31,7 +31,7 @@ test_cmp_rev () { } test_expect_success setup ' - git config advice.detachedhead false + git config advice.detachedhead false && echo unrelated >unrelated && git add unrelated && test_commit initial foo a && diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh index 8b4e80de96..6cebb3951b 100755 --- a/t/t4012-diff-binary.sh +++ b/t/t4012-diff-binary.sh @@ -36,6 +36,18 @@ test_expect_success '"apply --stat" output for binary file change' ' test_i18ncmp expected current ' +test_expect_success 'diff --shortstat output for binary file change' ' + echo " 4 files changed, 2 insertions(+), 2 deletions(-)" >expected && + git diff --shortstat >current && + test_i18ncmp expected current +' + +test_expect_success 'diff --shortstat output for binary file change only' ' + echo " 1 file changed, 0 insertions(+), 0 deletions(-)" >expected && + git diff --shortstat -- b >current && + test_i18ncmp expected current +' + test_expect_success 'apply --numstat notices binary file change' ' git diff >diff && git apply --numstat <diff >current && diff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh index c6feca44e3..7ff6e0e16c 100755 --- a/t/t5701-clone-local.sh +++ b/t/t5701-clone-local.sh @@ -124,4 +124,14 @@ test_expect_success 'cloning non-git directory fails' ' test_must_fail git clone not-a-git-repo not-a-git-repo-clone ' +test_expect_success 'cloning file:// does not hardlink' ' + git clone --bare file://"$(pwd)"/a non-local && + ! repo_is_hardlinked non-local +' + +test_expect_success 'cloning a local path with --no-local does not hardlink' ' + git clone --bare --no-local a force-nonlocal && + ! repo_is_hardlinked force-nonlocal +' + test_done diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh index 9b50f54cc2..992c2a0467 100755 --- a/t/t6200-fmt-merge-msg.sh +++ b/t/t6200-fmt-merge-msg.sh @@ -102,8 +102,8 @@ test_expect_success '[merge] summary/log configuration' ' cat >expected <<-EOF && Merge branch ${apos}left${apos} - By Another Author (3) and A U Thor (2) - via Another Committer + # By Another Author (3) and A U Thor (2) + # Via Another Committer * left: Left #5 Left #4 @@ -149,8 +149,8 @@ test_expect_success 'merge.log=3 limits shortlog length' ' cat >expected <<-EOF && Merge branch ${apos}left${apos} - By Another Author (3) and A U Thor (2) - via Another Committer + # By Another Author (3) and A U Thor (2) + # Via Another Committer * left: (5 commits) Left #5 Left #4 @@ -166,8 +166,8 @@ test_expect_success 'merge.log=5 shows all 5 commits' ' cat >expected <<-EOF && Merge branch ${apos}left${apos} - By Another Author (3) and A U Thor (2) - via Another Committer + # By Another Author (3) and A U Thor (2) + # Via Another Committer * left: Left #5 Left #4 @@ -190,8 +190,8 @@ test_expect_success '--log=3 limits shortlog length' ' cat >expected <<-EOF && Merge branch ${apos}left${apos} - By Another Author (3) and A U Thor (2) - via Another Committer + # By Another Author (3) and A U Thor (2) + # Via Another Committer * left: (5 commits) Left #5 Left #4 @@ -207,8 +207,8 @@ test_expect_success '--log=5 shows all 5 commits' ' cat >expected <<-EOF && Merge branch ${apos}left${apos} - By Another Author (3) and A U Thor (2) - via Another Committer + # By Another Author (3) and A U Thor (2) + # Via Another Committer * left: Left #5 Left #4 @@ -238,8 +238,8 @@ test_expect_success 'fmt-merge-msg -m' ' cat >expected.log <<-EOF && Sync with left - By Another Author (3) and A U Thor (2) - via Another Committer + # By Another Author (3) and A U Thor (2) + # Via Another Committer * ${apos}left${apos} of $(pwd): Left #5 Left #4 @@ -271,8 +271,8 @@ test_expect_success 'setup: expected shortlog for two branches' ' cat >expected <<-EOF Merge branches ${apos}left${apos} and ${apos}right${apos} - By Another Author (3) and A U Thor (2) - via Another Committer + # By Another Author (3) and A U Thor (2) + # Via Another Committer * left: Left #5 Left #4 @@ -396,8 +396,8 @@ test_expect_success 'merge-msg two tags' ' Common #2 Common #1 - By Another Author (3) and A U Thor (2) - via Another Committer + # By Another Author (3) and A U Thor (2) + # Via Another Committer * tag ${apos}tag-l5${apos}: Left #5 Left #4 @@ -426,8 +426,8 @@ test_expect_success 'merge-msg tag and branch' ' Common #2 Common #1 - By Another Author (3) and A U Thor (2) - via Another Committer + # By Another Author (3) and A U Thor (2) + # Via Another Committer * left: Left #5 Left #4 diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh index fa2f65f6be..ef86948d21 100755 --- a/t/t9501-gitweb-standalone-http-status.sh +++ b/t/t9501-gitweb-standalone-http-status.sh @@ -12,6 +12,13 @@ code and message.' . ./gitweb-lib.sh +# +# Gitweb only provides the functionality tested by the 'modification times' +# tests if it can access a date parser from one of these modules: +# +perl -MHTTP::Date -e 0 >/dev/null 2>&1 && test_set_prereq DATE_PARSER +perl -MTime::ParseDate -e 0 >/dev/null 2>&1 && test_set_prereq DATE_PARSER + # ---------------------------------------------------------------------- # snapshot settings @@ -115,14 +122,14 @@ test_debug 'cat gitweb.output' # ---------------------------------------------------------------------- # modification times (Last-Modified and If-Modified-Since) -test_expect_success 'modification: feed last-modified' ' +test_expect_success DATE_PARSER 'modification: feed last-modified' ' gitweb_run "p=.git;a=atom;h=master" && grep "Status: 200 OK" gitweb.headers && grep "Last-modified: Thu, 7 Apr 2005 22:14:13 +0000" gitweb.headers ' test_debug 'cat gitweb.headers' -test_expect_success 'modification: feed if-modified-since (modified)' ' +test_expect_success DATE_PARSER 'modification: feed if-modified-since (modified)' ' export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" && test_when_finished "unset HTTP_IF_MODIFIED_SINCE" && gitweb_run "p=.git;a=atom;h=master" && @@ -130,7 +137,7 @@ test_expect_success 'modification: feed if-modified-since (modified)' ' ' test_debug 'cat gitweb.headers' -test_expect_success 'modification: feed if-modified-since (unmodified)' ' +test_expect_success DATE_PARSER 'modification: feed if-modified-since (unmodified)' ' export HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" && test_when_finished "unset HTTP_IF_MODIFIED_SINCE" && gitweb_run "p=.git;a=atom;h=master" && @@ -138,14 +145,14 @@ test_expect_success 'modification: feed if-modified-since (unmodified)' ' ' test_debug 'cat gitweb.headers' -test_expect_success 'modification: snapshot last-modified' ' +test_expect_success DATE_PARSER 'modification: snapshot last-modified' ' gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" && grep "Status: 200 OK" gitweb.headers && grep "Last-modified: Thu, 7 Apr 2005 22:14:13 +0000" gitweb.headers ' test_debug 'cat gitweb.headers' -test_expect_success 'modification: snapshot if-modified-since (modified)' ' +test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (modified)' ' export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" && test_when_finished "unset HTTP_IF_MODIFIED_SINCE" && gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" && @@ -153,7 +160,7 @@ test_expect_success 'modification: snapshot if-modified-since (modified)' ' ' test_debug 'cat gitweb.headers' -test_expect_success 'modification: snapshot if-modified-since (unmodified)' ' +test_expect_success DATE_PARSER 'modification: snapshot if-modified-since (unmodified)' ' export HTTP_IF_MODIFIED_SINCE="Thu, 7 Apr 2005 22:14:13 +0000" && test_when_finished "unset HTTP_IF_MODIFIED_SINCE" && gitweb_run "p=.git;a=snapshot;h=master;sf=tgz" && @@ -161,7 +168,7 @@ test_expect_success 'modification: snapshot if-modified-since (unmodified)' ' ' test_debug 'cat gitweb.headers' -test_expect_success 'modification: tree snapshot' ' +test_expect_success DATE_PARSER 'modification: tree snapshot' ' ID=`git rev-parse --verify HEAD^{tree}` && export HTTP_IF_MODIFIED_SINCE="Wed, 6 Apr 2005 22:14:13 +0000" && test_when_finished "unset HTTP_IF_MODIFIED_SINCE" && diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 9a80c60945..256e6a0b3f 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -63,7 +63,7 @@ run_completion () local _cword _words=( $1 ) (( _cword = ${#_words[@]} - 1 )) - __git_wrap_main_git && print_comp + __git_wrap__git_main && print_comp } test_completion () |