aboutsummaryrefslogtreecommitdiff
path: root/t/t4051-diff-function-context.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4051-diff-function-context.sh')
-rwxr-xr-xt/t4051-diff-function-context.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t4051-diff-function-context.sh b/t/t4051-diff-function-context.sh
index 6154acb45..2d76a971c 100755
--- a/t/t4051-diff-function-context.sh
+++ b/t/t4051-diff-function-context.sh
@@ -72,7 +72,8 @@ test_expect_success 'setup' '
# overlap function context of 1st change and -u context of 2nd change
grep -v "delete me from hello" <"$dir/hello.c" >file.c &&
- sed 2p <"$dir/dummy.c" >>file.c &&
+ sed "2a\\
+ extra line" <"$dir/dummy.c" >>file.c &&
commit_and_tag changed_hello_dummy file.c &&
git checkout initial &&
@@ -84,6 +85,10 @@ test_expect_success 'setup' '
check_diff changed_hello 'changed function'
+test_expect_success ' context includes comment' '
+ grep "^ .*Hello comment" changed_hello.diff
+'
+
test_expect_success ' context includes begin' '
grep "^ .*Begin of hello" changed_hello.diff
'