Skip to content

Commit dedb912

Browse files
sunshinecogitster
authored andcommitted
t8001/t8002: blame: demonstrate acceptance of bogus -LX,+0 and -LX,-0
Empty ranges -LX,+0 and -LX,-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 63828b8 commit dedb912

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 X,+0' '
189+
test_must_fail $PROG -L1,+0 file
190+
'
191+
188192
test_expect_success 'blame -L X,+1' '
189193
check_count -L3,+1 B2 1
190194
'
@@ -193,6 +197,10 @@ test_expect_success 'blame -L X,+N' '
193197
check_count -L3,+4 B 1 B1 1 B2 1 D 1
194198
'
195199

200+
test_expect_failure 'blame -L X,-0' '
201+
test_must_fail $PROG -L1,-0 file
202+
'
203+
196204
test_expect_success 'blame -L X,-1' '
197205
check_count -L3,-1 B2 1
198206
'

0 commit comments

Comments
 (0)