t7810: add test for grep -W and trailing empty context lines
[gitweb.git] / t / t4051-diff-function-context.sh
index ca017255ba498c6a5d31375d58416367dfda6cc4..b6bb04ab82a11bd208b44071e3c318bd14ccd500 100755 (executable)
@@ -85,7 +85,7 @@ test_expect_success ' context does not include preceding empty lines' '
        test "$(first_context_line <changed_hello.diff)" != " "
 '
 
-test_expect_failure ' context does not include trailing empty lines' '
+test_expect_success ' context does not include trailing empty lines' '
        test "$(last_context_line <changed_hello.diff)" != " "
 '
 
@@ -103,7 +103,7 @@ test_expect_success ' context does not include other functions' '
        test $(grep -c "^[ +-].*Begin" changed_includes.diff) -le 1
 '
 
-test_expect_failure ' context does not include trailing empty lines' '
+test_expect_success ' context does not include trailing empty lines' '
        test "$(last_context_line <changed_includes.diff)" != " "
 '
 
@@ -117,7 +117,7 @@ test_expect_success ' context includes end' '
        grep "^[+].*End of first part" appended.diff
 '
 
-test_expect_failure ' context does not include other functions' '
+test_expect_success ' context does not include other functions' '
        test $(grep -c "^[ +-].*Begin" appended.diff) -le 1
 '
 
@@ -131,7 +131,7 @@ test_expect_success ' context includes end' '
        grep "^[+].*End of second part" extended.diff
 '
 
-test_expect_failure ' context does not include other functions' '
+test_expect_success ' context does not include other functions' '
        test $(grep -c "^[ +-].*Begin" extended.diff) -le 2
 '
 
@@ -145,7 +145,7 @@ test_expect_success ' context includes begin' '
        grep "^ .*Begin of first part" long_common_tail.diff
 '
 
-test_expect_failure ' context includes end' '
+test_expect_success ' context includes end' '
        grep "^ .*End of second part" long_common_tail.diff
 '