write_entry(): use fstat() instead of lstat() when file is open
[gitweb.git] / t / t3301-notes.sh
index ba42c45ec4f3a786a53c059be9dadaff763ad644..9393a25511f46632763c374fec700c3eb446509e 100755 (executable)
@@ -59,7 +59,37 @@ EOF
 test_expect_success 'show notes' '
        ! (git cat-file commit HEAD | grep b1) &&
        git log -1 > output &&
-       git diff expect output
+       test_cmp expect output
+'
+test_expect_success 'create multi-line notes (setup)' '
+       : > a3 &&
+       git add a3 &&
+       test_tick &&
+       git commit -m 3rd &&
+       MSG="b3
+c3c3c3c3
+d3d3d3" git notes edit
+'
+
+cat > expect-multiline << EOF
+commit 1584215f1d29c65e99c6c6848626553fdd07fd75
+Author: A U Thor <author@example.com>
+Date:   Thu Apr 7 15:15:13 2005 -0700
+
+    3rd
+
+Notes:
+    b3
+    c3c3c3c3
+    d3d3d3
+EOF
+
+printf "\n" >> expect-multiline
+cat expect >> expect-multiline
+
+test_expect_success 'show multi-line notes' '
+       git log -2 > output &&
+       test_cmp expect-multiline output
 '
 
 test_done