3 # Copyright (c) 2013, 2014 Christian Couder
6 test_description='git interpret-trailers'
10 # When we want one trailing space at the end of each line, let's use sed
11 # to make sure that these spaces are not removed by any automatic tool.
13 test_expect_success 'setup' '
15 cat >basic_message <<-\EOF &&
20 cat >complex_message_body <<-\EOF &&
24 and contains some special
28 sed -e "s/ Z\$/ /" >complex_message_trailers <<-\EOF &&
34 cat >basic_patch <<-\EOF
37 1 file changed, 1 insertion(+), 1 deletion(-)
39 diff --git a/foo.txt b/foo.txt
40 index 0353767..1d91aa1 100644
54 test_expect_success 'without config' '
55 sed -e "s/ Z\$/ /" >expected <<-\EOF &&
61 git interpret-trailers --trailer "ack = Peff" --trailer "Reviewed-by" \
62 --trailer "Acked-by: Johan" empty >actual &&
63 test_cmp expected actual
66 test_expect_success 'without config in another order' '
67 sed -e "s/ Z\$/ /" >expected <<-\EOF &&
73 git interpret-trailers --trailer "Acked-by: Johan" --trailer "Reviewed-by" \
74 --trailer "ack = Peff" empty >actual &&
75 test_cmp expected actual
78 test_expect_success '--trim-empty without config' '
79 cat >expected <<-\EOF &&
84 git interpret-trailers --trim-empty --trailer ack=Peff \
85 --trailer "Reviewed-by" --trailer "Acked-by: Johan" \
86 --trailer "sob:" empty >actual &&
87 test_cmp expected actual
90 test_expect_success 'with config option on the command line' '
91 cat >expected <<-\EOF &&
96 { echo; echo "Acked-by: Johan"; } |
97 git -c "trailer.Acked-by.ifexists=addifdifferent" interpret-trailers \
98 --trailer "Reviewed-by: Peff" --trailer "Acked-by: Johan" >actual &&
99 test_cmp expected actual
102 test_expect_success 'with only a title in the message' '
103 cat >expected <<-\EOF &&
109 echo "area: change" |
110 git interpret-trailers --trailer "Reviewed-by: Peff" \
111 --trailer "Acked-by: Johan" >actual &&
112 test_cmp expected actual
115 test_expect_success 'with multiline title in the message' '
116 cat >expected <<-\EOF &&
123 printf "%s\n" "place of" "code: change" |
124 git interpret-trailers --trailer "Reviewed-by: Peff" \
125 --trailer "Acked-by: Johan" >actual &&
126 test_cmp expected actual
129 test_expect_success 'with config setup' '
130 git config trailer.ack.key "Acked-by: " &&
131 cat >expected <<-\EOF &&
135 git interpret-trailers --trim-empty --trailer "ack = Peff" empty >actual &&
136 test_cmp expected actual &&
137 git interpret-trailers --trim-empty --trailer "Acked-by = Peff" empty >actual &&
138 test_cmp expected actual &&
139 git interpret-trailers --trim-empty --trailer "Acked-by :Peff" empty >actual &&
140 test_cmp expected actual
143 test_expect_success 'with config setup and ":=" as separators' '
144 git config trailer.separators ":=" &&
145 git config trailer.ack.key "Acked-by= " &&
146 cat >expected <<-\EOF &&
150 git interpret-trailers --trim-empty --trailer "ack = Peff" empty >actual &&
151 test_cmp expected actual &&
152 git interpret-trailers --trim-empty --trailer "Acked-by= Peff" empty >actual &&
153 test_cmp expected actual &&
154 git interpret-trailers --trim-empty --trailer "Acked-by : Peff" empty >actual &&
155 test_cmp expected actual
158 test_expect_success 'with config setup and "%" as separators' '
159 git config trailer.separators "%" &&
160 cat >expected <<-\EOF &&
166 git interpret-trailers --trim-empty --trailer "bug = 42" \
167 --trailer count%10 --trailer "test: stuff" \
168 --trailer "bug % 422" empty >actual &&
169 test_cmp expected actual
172 test_expect_success 'with "%" as separators and a message with trailers' '
173 cat >special_message <<-\EOF &&
180 cat >expected <<-\EOF &&
188 git interpret-trailers --trailer count%100 \
189 special_message >actual &&
190 test_cmp expected actual
193 test_expect_success 'with config setup and ":=#" as separators' '
194 git config trailer.separators ":=#" &&
195 git config trailer.bug.key "Bug #" &&
196 cat >expected <<-\EOF &&
200 git interpret-trailers --trim-empty --trailer "bug = 42" empty >actual &&
201 test_cmp expected actual
204 test_expect_success 'with commit basic message' '
205 cat basic_message >expected &&
207 git interpret-trailers <basic_message >actual &&
208 test_cmp expected actual
211 test_expect_success 'with basic patch' '
212 cat basic_message >input &&
213 cat basic_patch >>input &&
214 cat basic_message >expected &&
216 cat basic_patch >>expected &&
217 git interpret-trailers <input >actual &&
218 test_cmp expected actual
221 test_expect_success 'with commit complex message as argument' '
222 cat complex_message_body complex_message_trailers >complex_message &&
223 cat complex_message_body >expected &&
224 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
230 git interpret-trailers complex_message >actual &&
231 test_cmp expected actual
234 test_expect_success 'with 2 files arguments' '
235 cat basic_message >>expected &&
237 cat basic_patch >>expected &&
238 git interpret-trailers complex_message input >actual &&
239 test_cmp expected actual
242 test_expect_success 'with message that has comments' '
243 cat basic_message >message_with_comments &&
244 sed -e "s/ Z\$/ /" >>message_with_comments <<-\EOF &&
249 # yet another comment
255 cat basic_patch >>message_with_comments &&
256 cat basic_message >expected &&
257 cat >>expected <<-\EOF &&
265 cat basic_patch >>expected &&
266 git interpret-trailers --trim-empty --trailer "Cc: Peff" message_with_comments >actual &&
267 test_cmp expected actual
270 test_expect_success 'with message that has an old style conflict block' '
271 cat basic_message >message_with_comments &&
272 sed -e "s/ Z\$/ /" >>message_with_comments <<-\EOF &&
277 # yet another comment
285 cat basic_message >expected &&
286 cat >>expected <<-\EOF &&
296 git interpret-trailers --trim-empty --trailer "Cc: Peff" message_with_comments >actual &&
297 test_cmp expected actual
300 test_expect_success 'with commit complex message and trailer args' '
301 cat complex_message_body >expected &&
302 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
310 git interpret-trailers --trailer "ack: Peff" \
311 --trailer "bug: 42" <complex_message >actual &&
312 test_cmp expected actual
315 test_expect_success 'with complex patch, args and --trim-empty' '
316 cat complex_message >complex_patch &&
317 cat basic_patch >>complex_patch &&
318 cat complex_message_body >expected &&
319 cat >>expected <<-\EOF &&
323 cat basic_patch >>expected &&
324 git interpret-trailers --trim-empty --trailer "ack: Peff" \
325 --trailer "bug: 42" <complex_patch >actual &&
326 test_cmp expected actual
329 test_expect_success 'in-place editing with basic patch' '
330 cat basic_message >message &&
331 cat basic_patch >>message &&
332 cat basic_message >expected &&
334 cat basic_patch >>expected &&
335 git interpret-trailers --in-place message &&
336 test_cmp expected message
339 test_expect_success 'in-place editing with additional trailer' '
340 cat basic_message >message &&
341 cat basic_patch >>message &&
342 cat basic_message >expected &&
344 cat >>expected <<-\EOF &&
347 cat basic_patch >>expected &&
348 git interpret-trailers --trailer "Reviewed-by: Alice" --in-place message &&
349 test_cmp expected message
352 test_expect_success 'in-place editing on stdin disallowed' '
353 test_must_fail git interpret-trailers --trailer "Reviewed-by: Alice" --in-place < basic_message
356 test_expect_success 'in-place editing on non-existing file' '
357 test_must_fail git interpret-trailers --trailer "Reviewed-by: Alice" --in-place nonexisting &&
358 test_path_is_missing nonexisting
361 test_expect_success POSIXPERM,SANITY "in-place editing doesn't clobber original file on error" '
362 cat basic_message >message &&
364 test_must_fail git interpret-trailers --trailer "Reviewed-by: Alice" --in-place message &&
366 test_cmp message basic_message
369 test_expect_success 'using "where = before"' '
370 git config trailer.bug.where "before" &&
371 cat complex_message_body >expected &&
372 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
380 git interpret-trailers --trailer "ack: Peff" \
381 --trailer "bug: 42" complex_message >actual &&
382 test_cmp expected actual
385 test_expect_success 'using "where = after"' '
386 git config trailer.ack.where "after" &&
387 cat complex_message_body >expected &&
388 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
396 git interpret-trailers --trailer "ack: Peff" \
397 --trailer "bug: 42" complex_message >actual &&
398 test_cmp expected actual
401 test_expect_success 'using "where = end"' '
402 git config trailer.review.key "Reviewed-by" &&
403 git config trailer.review.where "end" &&
404 cat complex_message_body >expected &&
405 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
412 Reviewed-by: Johannes
414 git interpret-trailers --trailer "ack: Peff" \
415 --trailer "Reviewed-by: Junio" --trailer "Reviewed-by: Johannes" \
416 complex_message >actual &&
417 test_cmp expected actual
420 test_expect_success 'using "where = start"' '
421 git config trailer.review.key "Reviewed-by" &&
422 git config trailer.review.where "start" &&
423 cat complex_message_body >expected &&
424 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
425 Reviewed-by: Johannes
433 git interpret-trailers --trailer "ack: Peff" \
434 --trailer "Reviewed-by: Junio" --trailer "Reviewed-by: Johannes" \
435 complex_message >actual &&
436 test_cmp expected actual
439 test_expect_success 'using "where = before" for a token in the middle of the message' '
440 git config trailer.review.key "Reviewed-by:" &&
441 git config trailer.review.where "before" &&
442 cat complex_message_body >expected &&
443 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
452 git interpret-trailers --trailer "ack: Peff" --trailer "bug: 42" \
453 --trailer "review: Johan" <complex_message >actual &&
454 test_cmp expected actual
457 test_expect_success 'using "where = before" and --trim-empty' '
458 cat complex_message_body >expected &&
459 cat >>expected <<-\EOF &&
465 git interpret-trailers --trim-empty --trailer "ack: Peff" \
466 --trailer "bug: 42" --trailer "review: Johan" \
467 --trailer "Bug: 46" <complex_message >actual &&
468 test_cmp expected actual
471 test_expect_success 'the default is "ifExists = addIfDifferentNeighbor"' '
472 cat complex_message_body >expected &&
473 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
483 git interpret-trailers --trailer "ack: Peff" --trailer "review:" \
484 --trailer "ack: Junio" --trailer "bug: 42" --trailer "ack: Peff" \
485 --trailer "ack: Peff" <complex_message >actual &&
486 test_cmp expected actual
489 test_expect_success 'default "ifExists" is now "addIfDifferent"' '
490 git config trailer.ifexists "addIfDifferent" &&
491 cat complex_message_body >expected &&
492 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
501 git interpret-trailers --trailer "ack: Peff" --trailer "review:" \
502 --trailer "ack: Junio" --trailer "bug: 42" --trailer "ack: Peff" \
503 --trailer "ack: Peff" <complex_message >actual &&
504 test_cmp expected actual
507 test_expect_success 'using "ifExists = addIfDifferent" with "where = end"' '
508 git config trailer.ack.ifExists "addIfDifferent" &&
509 git config trailer.ack.where "end" &&
510 cat complex_message_body >expected &&
511 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
519 git interpret-trailers --trailer "ack: Peff" --trailer "review:" \
520 --trailer "bug: 42" --trailer "ack: Peff" \
521 <complex_message >actual &&
522 test_cmp expected actual
525 test_expect_success 'using "ifExists = addIfDifferent" with "where = before"' '
526 git config trailer.ack.ifExists "addIfDifferent" &&
527 git config trailer.ack.where "before" &&
528 cat complex_message_body >expected &&
529 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
537 git interpret-trailers --trailer "ack: Peff" --trailer "review:" \
538 --trailer "bug: 42" --trailer "ack: Peff" \
539 <complex_message >actual &&
540 test_cmp expected actual
543 test_expect_success 'using "ifExists = addIfDifferentNeighbor" with "where = end"' '
544 git config trailer.ack.ifExists "addIfDifferentNeighbor" &&
545 git config trailer.ack.where "end" &&
546 cat complex_message_body >expected &&
547 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
559 git interpret-trailers --trailer "ack: Peff" --trailer "review:" \
560 --trailer "ack: Junio" --trailer "bug: 42" \
561 --trailer "Tested-by: Jakub" --trailer "ack: Junio" \
562 --trailer "ack: Junio" --trailer "ack: Peff" <complex_message >actual &&
563 test_cmp expected actual
566 test_expect_success 'using "ifExists = addIfDifferentNeighbor" with "where = after"' '
567 git config trailer.ack.ifExists "addIfDifferentNeighbor" &&
568 git config trailer.ack.where "after" &&
569 cat complex_message_body >expected &&
570 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
581 git interpret-trailers --trailer "ack: Peff" --trailer "review:" \
582 --trailer "ack: Junio" --trailer "bug: 42" \
583 --trailer "Tested-by: Jakub" --trailer "ack: Junio" \
584 --trailer "ack: Junio" --trailer "ack: Peff" <complex_message >actual &&
585 test_cmp expected actual
588 test_expect_success 'using "ifExists = addIfDifferentNeighbor" and --trim-empty' '
589 git config trailer.ack.ifExists "addIfDifferentNeighbor" &&
590 cat complex_message_body >expected &&
591 cat >>expected <<-\EOF &&
597 git interpret-trailers --trim-empty --trailer "ack: Peff" \
598 --trailer "Acked-by= Peff" --trailer "review:" \
599 --trailer "ack: Junio" --trailer "bug: 42" \
600 --trailer "ack: Peff" <complex_message >actual &&
601 test_cmp expected actual
604 test_expect_success 'using "ifExists = add" with "where = end"' '
605 git config trailer.ack.ifExists "add" &&
606 git config trailer.ack.where "end" &&
607 cat complex_message_body >expected &&
608 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
621 git interpret-trailers --trailer "ack: Peff" \
622 --trailer "Acked-by= Peff" --trailer "review:" \
623 --trailer "Tested-by: Jakub" --trailer "ack: Junio" \
624 --trailer "bug: 42" --trailer "Tested-by: Johannes" \
625 --trailer "ack: Peff" <complex_message >actual &&
626 test_cmp expected actual
629 test_expect_success 'using "ifExists = add" with "where = after"' '
630 git config trailer.ack.ifExists "add" &&
631 git config trailer.ack.where "after" &&
632 cat complex_message_body >expected &&
633 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
644 git interpret-trailers --trailer "ack: Peff" \
645 --trailer "Acked-by= Peff" --trailer "review:" \
646 --trailer "ack: Junio" --trailer "bug: 42" \
647 --trailer "ack: Peff" <complex_message >actual &&
648 test_cmp expected actual
651 test_expect_success 'using "ifExists = replace"' '
652 git config trailer.fix.key "Fixes: " &&
653 git config trailer.fix.ifExists "replace" &&
654 cat complex_message_body >expected &&
655 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
664 git interpret-trailers --trailer "review:" \
665 --trailer "fix=53" --trailer "ack: Junio" --trailer "fix=22" \
666 --trailer "bug: 42" --trailer "ack: Peff" \
667 <complex_message >actual &&
668 test_cmp expected actual
671 test_expect_success 'using "ifExists = replace" with "where = after"' '
672 git config trailer.fix.where "after" &&
673 cat complex_message_body >expected &&
674 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
683 git interpret-trailers --trailer "review:" \
684 --trailer "fix=53" --trailer "ack: Junio" --trailer "fix=22" \
685 --trailer "bug: 42" --trailer "ack: Peff" \
686 <complex_message >actual &&
687 test_cmp expected actual
690 test_expect_success 'using "ifExists = doNothing"' '
691 git config trailer.fix.ifExists "doNothing" &&
692 cat complex_message_body >expected &&
693 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
702 git interpret-trailers --trailer "review:" --trailer "fix=53" \
703 --trailer "ack: Junio" --trailer "fix=22" \
704 --trailer "bug: 42" --trailer "ack: Peff" \
705 <complex_message >actual &&
706 test_cmp expected actual
709 test_expect_success 'the default is "ifMissing = add"' '
710 git config trailer.cc.key "Cc: " &&
711 git config trailer.cc.where "before" &&
712 cat complex_message_body >expected &&
713 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
723 git interpret-trailers --trailer "review:" --trailer "fix=53" \
724 --trailer "cc=Linus" --trailer "ack: Junio" \
725 --trailer "fix=22" --trailer "bug: 42" --trailer "ack: Peff" \
726 <complex_message >actual &&
727 test_cmp expected actual
730 test_expect_success 'when default "ifMissing" is "doNothing"' '
731 git config trailer.ifmissing "doNothing" &&
732 cat complex_message_body >expected &&
733 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
741 git interpret-trailers --trailer "review:" --trailer "fix=53" \
742 --trailer "cc=Linus" --trailer "ack: Junio" \
743 --trailer "fix=22" --trailer "bug: 42" --trailer "ack: Peff" \
744 <complex_message >actual &&
745 test_cmp expected actual &&
746 git config trailer.ifmissing "add"
749 test_expect_success 'using "ifMissing = add" with "where = end"' '
750 git config trailer.cc.key "Cc: " &&
751 git config trailer.cc.where "end" &&
752 git config trailer.cc.ifMissing "add" &&
753 cat complex_message_body >expected &&
754 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
764 git interpret-trailers --trailer "review:" --trailer "fix=53" \
765 --trailer "ack: Junio" --trailer "fix=22" \
766 --trailer "bug: 42" --trailer "cc=Linus" --trailer "ack: Peff" \
767 <complex_message >actual &&
768 test_cmp expected actual
771 test_expect_success 'using "ifMissing = add" with "where = before"' '
772 git config trailer.cc.key "Cc: " &&
773 git config trailer.cc.where "before" &&
774 git config trailer.cc.ifMissing "add" &&
775 cat complex_message_body >expected &&
776 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
786 git interpret-trailers --trailer "review:" --trailer "fix=53" \
787 --trailer "ack: Junio" --trailer "fix=22" \
788 --trailer "bug: 42" --trailer "cc=Linus" --trailer "ack: Peff" \
789 <complex_message >actual &&
790 test_cmp expected actual
793 test_expect_success 'using "ifMissing = doNothing"' '
794 git config trailer.cc.ifMissing "doNothing" &&
795 cat complex_message_body >expected &&
796 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
805 git interpret-trailers --trailer "review:" --trailer "fix=53" \
806 --trailer "cc=Linus" --trailer "ack: Junio" \
807 --trailer "fix=22" --trailer "bug: 42" --trailer "ack: Peff" \
808 <complex_message >actual &&
809 test_cmp expected actual
812 test_expect_success 'default "where" is now "after"' '
813 git config trailer.where "after" &&
814 git config --unset trailer.ack.where &&
815 cat complex_message_body >expected &&
816 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
829 git interpret-trailers --trailer "ack: Peff" \
830 --trailer "Acked-by= Peff" --trailer "review:" \
831 --trailer "Tested-by: Jakub" --trailer "ack: Junio" \
832 --trailer "bug: 42" --trailer "Tested-by: Johannes" \
833 --trailer "ack: Peff" <complex_message >actual &&
834 test_cmp expected actual
837 test_expect_success 'with simple command' '
838 git config trailer.sign.key "Signed-off-by: " &&
839 git config trailer.sign.where "after" &&
840 git config trailer.sign.ifExists "addIfDifferentNeighbor" &&
841 git config trailer.sign.command "echo \"A U Thor <author@example.com>\"" &&
842 cat complex_message_body >expected &&
843 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
848 Signed-off-by: A U Thor <author@example.com>
850 git interpret-trailers --trailer "review:" --trailer "fix=22" \
851 <complex_message >actual &&
852 test_cmp expected actual
855 test_expect_success 'with command using commiter information' '
856 git config trailer.sign.ifExists "addIfDifferent" &&
857 git config trailer.sign.command "echo \"\$GIT_COMMITTER_NAME <\$GIT_COMMITTER_EMAIL>\"" &&
858 cat complex_message_body >expected &&
859 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
864 Signed-off-by: C O Mitter <committer@example.com>
866 git interpret-trailers --trailer "review:" --trailer "fix=22" \
867 <complex_message >actual &&
868 test_cmp expected actual
871 test_expect_success 'with command using author information' '
872 git config trailer.sign.key "Signed-off-by: " &&
873 git config trailer.sign.where "after" &&
874 git config trailer.sign.ifExists "addIfDifferentNeighbor" &&
875 git config trailer.sign.command "echo \"\$GIT_AUTHOR_NAME <\$GIT_AUTHOR_EMAIL>\"" &&
876 cat complex_message_body >expected &&
877 sed -e "s/ Z\$/ /" >>expected <<-\EOF &&
882 Signed-off-by: A U Thor <author@example.com>
884 git interpret-trailers --trailer "review:" --trailer "fix=22" \
885 <complex_message >actual &&
886 test_cmp expected actual
889 test_expect_success 'setup a commit' '
890 echo "Content of the first commit." > a.txt &&
892 git commit -m "Add file a.txt"
895 test_expect_success 'with command using $ARG' '
896 git config trailer.fix.ifExists "replace" &&
897 git config trailer.fix.command "git log -1 --oneline --format=\"%h (%s)\" --abbrev-commit --abbrev=14 \$ARG" &&
898 FIXED=$(git log -1 --oneline --format="%h (%s)" --abbrev-commit --abbrev=14 HEAD) &&
899 cat complex_message_body >expected &&
900 sed -e "s/ Z\$/ /" >>expected <<-EOF &&
905 Signed-off-by: A U Thor <author@example.com>
907 git interpret-trailers --trailer "review:" --trailer "fix=HEAD" \
908 <complex_message >actual &&
909 test_cmp expected actual
912 test_expect_success 'with failing command using $ARG' '
913 git config trailer.fix.ifExists "replace" &&
914 git config trailer.fix.command "false \$ARG" &&
915 cat complex_message_body >expected &&
916 sed -e "s/ Z\$/ /" >>expected <<-EOF &&
921 Signed-off-by: A U Thor <author@example.com>
923 git interpret-trailers --trailer "review:" --trailer "fix=HEAD" \
924 <complex_message >actual &&
925 test_cmp expected actual
928 test_expect_success 'with empty tokens' '
929 git config --unset trailer.fix.command &&
930 cat >expected <<-EOF &&
932 Signed-off-by: A U Thor <author@example.com>
934 git interpret-trailers --trailer ":" --trailer ":test" >actual <<-EOF &&
936 test_cmp expected actual
939 test_expect_success 'with command but no key' '
940 git config --unset trailer.sign.key &&
941 cat >expected <<-EOF &&
943 sign: A U Thor <author@example.com>
945 git interpret-trailers >actual <<-EOF &&
947 test_cmp expected actual
950 test_expect_success 'with no command and no key' '
951 git config --unset trailer.review.key &&
952 cat >expected <<-EOF &&
955 sign: A U Thor <author@example.com>
957 git interpret-trailers --trailer "review:Junio" >actual <<-EOF &&
959 test_cmp expected actual