test: fix post rewrite hook report
[gitweb.git] / t / t4211-line-log.sh
index 2341351e1be8ae966992c93981ad5c787b15944d..7776f93e3dfe1b6f822d5ee6f206bed5ba38c75c 100755 (executable)
@@ -8,13 +8,20 @@ test_expect_success 'setup (import history)' '
        git reset --hard
 '
 
-canned_test () {
-       test_expect_success "$1" "
-               git log $1 >actual &&
-               test_cmp \"\$TEST_DIRECTORY\"/t4211/expect.$2 actual
+canned_test_1 () {
+       test_expect_$1 "$2" "
+               git log $2 >actual &&
+               test_cmp \"\$TEST_DIRECTORY\"/t4211/expect.$3 actual
        "
 }
 
+canned_test () {
+       canned_test_1 success "$@"
+}
+canned_test_failure () {
+       canned_test_1 failure "$@"
+}
+
 test_bad_opts () {
        test_expect_success "invalid args: $1" "
                test_must_fail git log $1 2>errors &&
@@ -37,7 +44,8 @@ canned_test "-L 20:a.c simple" end-of-file
 canned_test "-L '/long f/',/^}/:a.c -L /main/,/^}/:a.c simple" two-ranges
 canned_test "-L 24,+1:a.c simple" vanishes-early
 
-canned_test "-L '/long f/,/^}/:b.c' move-support" move-support-f
+canned_test "-M -L '/long f/,/^}/:b.c' move-support" move-support-f
+canned_test "-M -L ':f:b.c' parallel-change" parallel-change-f-to-main
 
 canned_test "-L 4,12:a.c -L :main:a.c simple" multiple
 canned_test "-L 4,18:a.c -L :main:a.c simple" multiple-overlapping