Code

strbuf_add_wrapped_text(): factor out strbuf_add_indented_text()
[git.git] / t / t4202-log.sh
index 1e952ca55b1ff146000153d720f11d1b7fa22707..779a5adf554d77464f2a326a2eb919e224993746 100755 (executable)
@@ -63,6 +63,27 @@ test_expect_success 'format' '
        test_cmp expect actual
 '
 
+cat > expect << EOF
+ This is
+  the sixth
+  commit.
+ This is
+  the fifth
+  commit.
+EOF
+
+test_expect_success 'format %w(12,1,2)' '
+
+       git log -2 --format="%w(12,1,2)This is the %s commit." > actual &&
+       test_cmp expect actual
+'
+
+test_expect_success 'format %w(,1,2)' '
+
+       git log -2 --format="%w(,1,2)This is%nthe %s%ncommit." > actual &&
+       test_cmp expect actual
+'
+
 cat > expect << EOF
 804a787 sixth
 394ef78 fifth