X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4202-log.sh;h=779a5adf554d77464f2a326a2eb919e224993746;hb=0196f4b5a325251f62192f164cd1061a3fd98be8;hp=1e952ca55b1ff146000153d720f11d1b7fa22707;hpb=04ce83e2b9a1f1512d3d0c873e8f13d06761620c;p=git.git diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 1e952ca55..779a5adf5 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -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