Skip to content

Commit

Permalink
t4211: demonstrate empty -L range crash
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
Helped-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Eric Sunshine authored and Junio C Hamano committed Jul 23, 2013
1 parent b6679e7 commit 5896097
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t/t4211-line-log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,12 @@ test_bad_opts "-L 1,1000:b.c" "has only.*lines"
test_bad_opts "-L :b.c" "argument.*not of the form"
test_bad_opts "-L :foo:b.c" "no match"

# There is a separate bug when an empty -L range is the first -L encountered,
# thus to demonstrate this particular bug, the empty -L range must follow a
# non-empty -L range.
test_expect_failure '-L {empty-range} (any -L)' '
n=$(expr $(wc -l <b.c) + 1) &&
git log -L1,1:b.c -L$n:b.c
'

test_done

0 comments on commit 5896097

Please sign in to comment.