diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh index ffc5697f46..47b50074f2 100644 --- a/t/annotate-tests.sh +++ b/t/annotate-tests.sh @@ -225,10 +225,32 @@ test_expect_success 'blame -L /RE/,-N' ' check_count -L/99/,-3 B 1 B2 1 D 1 ' +# 'file' ends with an incomplete line, so 'wc' reports one fewer lines than +# git-blame sees, hence the last line is actually $(wc...)+1. +test_expect_success 'blame -L X (X == nlines)' ' + n=$(expr $(wc -l nlines)' ' test_must_fail $PROG -L12345 file ' +test_expect_success 'blame -L ,Y (Y == nlines)' ' + n=$(expr $(wc -l nlines)' ' test_must_fail $PROG -L,12345 file '