summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2013-07-23 14:28:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-23 19:06:58 (GMT)
commit58960978462e66c3dbc53b274988e7f27e7c74e2 (patch)
tree6e1be8456a359b1c148d2461c489836b368cf246 /t
parentb6679e768f39f718b7f2983d1958f5fb1121f356 (diff)
downloadgit-58960978462e66c3dbc53b274988e7f27e7c74e2.zip
git-58960978462e66c3dbc53b274988e7f27e7c74e2.tar.gz
git-58960978462e66c3dbc53b274988e7f27e7c74e2.tar.bz2
t4211: demonstrate empty -L range crash
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>
Diffstat (limited to 't')
-rwxr-xr-xt/t4211-line-log.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh
index 7776f93..9042178 100755
--- a/t/t4211-line-log.sh
+++ b/t/t4211-line-log.sh
@@ -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