t8001/t8002: blame: add tests of multiple -L options

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric Sunshine committed Aug 6, 2013 at 09:59 UTC 91b5494e18965e51c924ca55aaa27e94ebd82dd2
1 file changed +32
t/annotate-tests.sh
+32
@@ -271,6 +271,38 @@ test_expect_success 'blame -L ,Y (Y > nlines)' '
271 test_must_fail $PROG -L,12345 file
272 '
273
274 +test_expect_success 'blame -L multiple (disjoint)' '
275 + check_count -L2,3 -L6,7 A 1 B1 1 B2 1 "A U Thor" 1
276 +'
277 +
278 +test_expect_success 'blame -L multiple (disjoint: unordered)' '
279 + check_count -L6,7 -L2,3 A 1 B1 1 B2 1 "A U Thor" 1
280 +'
281 +
282 +test_expect_success 'blame -L multiple (adjacent)' '
283 + check_count -L2,3 -L4,5 A 1 B 1 B2 1 D 1
284 +'
285 +
286 +test_expect_success 'blame -L multiple (adjacent: unordered)' '
287 + check_count -L4,5 -L2,3 A 1 B 1 B2 1 D 1
288 +'
289 +
290 +test_expect_success 'blame -L multiple (overlapping)' '
291 + check_count -L2,4 -L3,5 A 1 B 1 B2 1 D 1
292 +'
293 +
294 +test_expect_success 'blame -L multiple (overlapping: unordered)' '
295 + check_count -L3,5 -L2,4 A 1 B 1 B2 1 D 1
296 +'
297 +
298 +test_expect_success 'blame -L multiple (superset/subset)' '
299 + check_count -L2,8 -L3,5 A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
300 +'
301 +
302 +test_expect_success 'blame -L multiple (superset/subset: unordered)' '
303 + check_count -L3,5 -L2,8 A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
304 +'
305 +
306 test_expect_success 'setup -L :regex' '
307 tr Q "\\t" >hello.c <<-\EOF &&
308 int main(int argc, const char *argv[])