Skip to content

Commit 82cd7e5

Browse files
sunshinecogitster
authored andcommitted
t8001/t8002: blame: demonstrate acceptance of bogus -L,+0 and -L,-0
Empty ranges -L,+0 and -L,-0 are nonsensical in the context of blame yet they are accepted. They should be errors. Demonstrate this shortcoming. Signed-off-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent abba353 commit 82cd7e5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

t/annotate-tests.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ test_expect_success 'blame -L Y,X (undocumented)' '
185185
check_count -L6,3 B 1 B1 1 B2 1 D 1
186186
'
187187

188+
test_expect_failure 'blame -L ,+0' '
189+
test_must_fail $PROG -L,+0 file
190+
'
191+
188192
test_expect_success 'blame -L X,+0' '
189193
test_must_fail $PROG -L1,+0 file
190194
'
@@ -197,6 +201,10 @@ test_expect_success 'blame -L X,+N' '
197201
check_count -L3,+4 B 1 B1 1 B2 1 D 1
198202
'
199203

204+
test_expect_failure 'blame -L ,-0' '
205+
test_must_fail $PROG -L,-0 file
206+
'
207+
200208
test_expect_success 'blame -L X,-0' '
201209
test_must_fail $PROG -L1,-0 file
202210
'

0 commit comments

Comments
 (0)