X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft8003-blame.sh;h=230143cf318705fb01e61f10072a096e86186934;hb=d5f5d0a9443c3892cdf9665ed8e0f9004706ed65;hp=4a8db74f7e09a143e73d647479ef62af91547865;hpb=b0e67fffb42059cc5dca6f58c376a2ffc5fb4520;p=git.git diff --git a/t/t8003-blame.sh b/t/t8003-blame.sh index 4a8db74f7..230143cf3 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 && @@ -158,11 +166,23 @@ EOF ' test_expect_success 'blame -L with invalid start' ' - test_must_fail git blame -L5 tres 2>&1 | grep "has only 2 lines" + test_must_fail git blame -L5 tres 2>errors && + grep "has only 2 lines" errors ' test_expect_success 'blame -L with invalid end' ' - git blame -L1,5 tres 2>&1 | grep "has only 2 lines" + test_must_fail git blame -L1,5 tres 2>errors && + 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