summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-03-13 21:31:42 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-03-13 21:31:42 -0800
commit3a27f415dfa46bd9e5b693abcac708903d3134f4 (patch)
tree3abc27796e0476ae55deb26617e6587d49ca842a /t
parentMerge git://git.bogomips.org/git-svn (diff)
parentdon't use default revision if a rev was specified (diff)
downloadtgif-3a27f415dfa46bd9e5b693abcac708903d3134f4.tar.xz
Merge branch 'maint'
* maint: don't use default revision if a rev was specified for_each_recent_reflog_ent(): use strbuf, fix offset handling t/Makefile: remove test artifacts upon "make clean" blame: fix indent of line numbers
Diffstat (limited to 't')
-rw-r--r--t/Makefile2
-rwxr-xr-xt/t1411-reflog-show.sh9
-rwxr-xr-xt/t8003-blame.sh20
3 files changed, 30 insertions, 1 deletions
diff --git a/t/Makefile b/t/Makefile
index bd09390d32..25c559bb49 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -27,6 +27,8 @@ pre-clean:
clean:
$(RM) -r 'trash directory'.* test-results
+ $(RM) t????/cvsroot/CVSROOT/?*
+ $(RM) -r valgrind/bin
aggregate-results-and-cleanup: $(T)
$(MAKE) aggregate-results
diff --git a/t/t1411-reflog-show.sh b/t/t1411-reflog-show.sh
index c18ed8edf9..ba25ff354d 100755
--- a/t/t1411-reflog-show.sh
+++ b/t/t1411-reflog-show.sh
@@ -64,4 +64,13 @@ test_expect_success 'using --date= shows reflog date (oneline)' '
test_cmp expect actual
'
+: >expect
+test_expect_success 'empty reflog file' '
+ git branch empty &&
+ : >.git/logs/refs/heads/empty &&
+
+ git log -g empty >actual &&
+ test_cmp expect actual
+'
+
test_done
diff --git a/t/t8003-blame.sh b/t/t8003-blame.sh
index 3bbddd03cb..230143cf31 100755
--- a/t/t8003-blame.sh
+++ b/t/t8003-blame.sh
@@ -11,7 +11,15 @@ test_expect_success setup '
echo B B B B B >two &&
echo C C C C C >tres &&
echo ABC >mouse &&
- git add one two tres mouse &&
+ for i in 1 2 3 4 5 6 7 8 9
+ do
+ echo $i
+ done >nine_lines &&
+ for i in 1 2 3 4 5 6 7 8 9 a
+ do
+ echo $i
+ done >ten_lines &&
+ git add one two tres mouse nine_lines ten_lines &&
test_tick &&
GIT_AUTHOR_NAME=Initial git commit -m Initial &&
@@ -167,4 +175,14 @@ test_expect_success 'blame -L with invalid end' '
grep "has only 2 lines" errors
'
+test_expect_success 'indent of line numbers, nine lines' '
+ git blame nine_lines >actual &&
+ test $(grep -c " " actual) = 0
+'
+
+test_expect_success 'indent of line numbers, ten lines' '
+ git blame ten_lines >actual &&
+ test $(grep -c " " actual) = 9
+'
+
test_done