3 test_description
='git log'
6 .
"$TEST_DIRECTORY/lib-gpg.sh"
8 test_expect_success setup
'
13 git commit -m initial &&
18 git commit -m second &&
22 git commit -m third &&
27 git commit -m fourth &&
33 git commit -m fifth &&
41 printf "sixth\nfifth\nfourth\nthird\nsecond\ninitial" > expect
42 test_expect_success
'pretty' '
44 git log --pretty="format:%s" > actual &&
45 test_cmp expect actual
48 printf "sixth\nfifth\nfourth\nthird\nsecond\ninitial\n" > expect
49 test_expect_success
'pretty (tformat)' '
51 git log --pretty="tformat:%s" > actual &&
52 test_cmp expect actual
55 test_expect_success
'pretty (shortcut)' '
57 git log --pretty="%s" > actual &&
58 test_cmp expect actual
61 test_expect_success
'format' '
63 git log --format="%s" > actual &&
64 test_cmp expect actual
76 test_expect_success
'format %w(11,1,2)' '
78 git log -2 --format="%w(11,1,2)This is the %s commit." > actual &&
79 test_cmp expect actual
82 test_expect_success
'format %w(,1,2)' '
84 git log -2 --format="%w(,1,2)This is%nthe %s%ncommit." > actual &&
85 test_cmp expect actual
96 test_expect_success
'oneline' '
98 git log --oneline > actual &&
99 test_cmp expect actual
102 test_expect_success
'diff-filter=A' '
104 git log --no-renames --pretty="format:%s" --diff-filter=A HEAD > actual &&
105 git log --no-renames --pretty="format:%s" --diff-filter A HEAD > actual-separate &&
106 printf "fifth\nfourth\nthird\ninitial" > expect &&
107 test_cmp expect actual &&
108 test_cmp expect actual-separate
112 test_expect_success
'diff-filter=M' '
114 actual=$(git log --pretty="format:%s" --diff-filter=M HEAD) &&
115 expect=$(echo second) &&
116 verbose test "$actual" = "$expect"
120 test_expect_success
'diff-filter=D' '
122 actual=$(git log --no-renames --pretty="format:%s" --diff-filter=D HEAD) &&
123 expect=$(echo sixth ; echo third) &&
124 verbose test "$actual" = "$expect"
128 test_expect_success
'diff-filter=R' '
130 actual=$(git log -M --pretty="format:%s" --diff-filter=R HEAD) &&
131 expect=$(echo third) &&
132 verbose test "$actual" = "$expect"
136 test_expect_success
'diff-filter=C' '
138 actual=$(git log -C -C --pretty="format:%s" --diff-filter=C HEAD) &&
139 expect=$(echo fourth) &&
140 verbose test "$actual" = "$expect"
144 test_expect_success
'git log --follow' '
146 actual=$(git log --follow --pretty="format:%s" ichi) &&
147 expect=$(echo third ; echo second ; echo initial) &&
148 verbose test "$actual" = "$expect"
151 test_expect_success
'git config log.follow works like --follow' '
152 test_config log.follow true &&
153 actual=$(git log --pretty="format:%s" ichi) &&
154 expect=$(echo third ; echo second ; echo initial) &&
155 verbose test "$actual" = "$expect"
158 test_expect_success
'git config log.follow does not die with multiple paths' '
159 test_config log.follow true &&
160 git log --pretty="format:%s" ichi ein
163 test_expect_success
'git config log.follow does not die with no paths' '
164 test_config log.follow true &&
168 test_expect_success
'git config log.follow is overridden by --no-follow' '
169 test_config log.follow true &&
170 actual=$(git log --no-follow --pretty="format:%s" ichi) &&
172 verbose test "$actual" = "$expect"
180 test_expect_success
'git log --no-walk <commits> sorts by commit time' '
181 git log --no-walk --oneline 5d31159 804a787 394ef78 > actual &&
182 test_cmp expect actual
185 test_expect_success
'git log --no-walk=sorted <commits> sorts by commit time' '
186 git log --no-walk=sorted --oneline 5d31159 804a787 394ef78 > actual &&
187 test_cmp expect actual
195 test_expect_success
'git log --no-walk=unsorted <commits> leaves list of commits as given' '
196 git log --no-walk=unsorted --oneline 5d31159 804a787 394ef78 > actual &&
197 test_cmp expect actual
200 test_expect_success
'git show <commits> leaves list of commits as given' '
201 git show --oneline -s 5d31159 804a787 394ef78 > actual &&
202 test_cmp expect actual
205 test_expect_success
'setup case sensitivity tests' '
209 git commit -a -m Second
212 test_expect_success
'log --grep' '
213 echo second >expect &&
214 git log -1 --pretty="tformat:%s" --grep=sec >actual &&
215 test_cmp expect actual
222 test_expect_success
'log --invert-grep --grep' '
223 git log --pretty="tformat:%s" --invert-grep --grep=th --grep=Sec >actual &&
224 test_cmp expect actual
227 test_expect_success
'log --invert-grep --grep -i' '
228 echo initial >expect &&
229 git log --pretty="tformat:%s" --invert-grep -i --grep=th --grep=Sec >actual &&
230 test_cmp expect actual
233 test_expect_success
'log --grep option parsing' '
234 echo second >expect &&
235 git log -1 --pretty="tformat:%s" --grep sec >actual &&
236 test_cmp expect actual &&
237 test_must_fail git log -1 --pretty="tformat:%s" --grep
240 test_expect_success
'log -i --grep' '
241 echo Second >expect &&
242 git log -1 --pretty="tformat:%s" -i --grep=sec >actual &&
243 test_cmp expect actual
246 test_expect_success
'log --grep -i' '
247 echo Second >expect &&
248 git log -1 --pretty="tformat:%s" --grep=sec -i >actual &&
249 test_cmp expect actual
252 test_expect_success
'log -F -E --grep=<ere> uses ere' '
253 echo second >expect &&
254 git log -1 --pretty="tformat:%s" -F -E --grep=s.c.nd >actual &&
255 test_cmp expect actual
258 test_expect_success
'log with grep.patternType configuration' '
260 git -c grep.patterntype=fixed \
261 log -1 --pretty=tformat:%s --grep=s.c.nd >actual &&
262 test_cmp expect actual
265 test_expect_success
'log with grep.patternType configuration and command line' '
266 echo second >expect &&
267 git -c grep.patterntype=fixed \
268 log -1 --pretty=tformat:%s --basic-regexp --grep=s.c.nd >actual &&
269 test_cmp expect actual
282 test_expect_success
'simple log --graph' '
283 git log --graph --pretty=tformat:%s >actual &&
284 test_cmp expect actual
287 test_expect_success
'set up merge history' '
288 git checkout -b side HEAD~4 &&
289 test_commit side-1 1 1 &&
290 test_commit side-2 2 2 &&
291 git checkout master &&
296 * Merge branch
'side'
310 test_expect_success
'log --graph with merge' '
311 git log --graph --date-order --pretty=tformat:%s |
312 sed "s/ *\$//" >actual &&
313 test_cmp expect actual
316 cat > expect.colors
<<\EOF
317 * Merge branch
'side'
318 <BLUE
>|
<RESET
><CYAN
>\
<RESET
>
319 <BLUE
>|
<RESET
> * side-2
320 <BLUE
>|
<RESET
> * side-1
321 * <CYAN
>|
<RESET
> Second
322 * <CYAN
>|
<RESET
> sixth
323 * <CYAN
>|
<RESET
> fifth
324 * <CYAN
>|
<RESET
> fourth
325 <CYAN
>|
<RESET
><CYAN
>/<RESET
>
331 test_expect_success
'log --graph with merge with log.graphColors' '
332 test_config log.graphColors ",, blue,invalid-color, cyan, red , " &&
333 git log --color=always --graph --date-order --pretty=tformat:%s |
334 test_decode_color | sed "s/ *\$//" >actual &&
335 test_cmp expect.colors actual
338 test_expect_success
'log --raw --graph -m with merge' '
339 git log --raw --graph --oneline -m master | head -n 500 >actual &&
340 grep "initial" actual
343 test_expect_success
'diff-tree --graph' '
344 git diff-tree --graph master^ | head -n 500 >actual &&
351 | | Author
: A U Thor
<author@example.com
>
353 | | Merge branch
'side'
356 | | Author
: A U Thor
<author@example.com
>
360 |
* commit tags
/side-1
361 | | Author
: A U Thor
<author@example.com
>
366 | | Author
: A U Thor
<author@example.com
>
371 | | Author
: A U Thor
<author@example.com
>
376 | | Author
: A U Thor
<author@example.com
>
381 |
/ Author
: A U Thor
<author@example.com
>
385 * commit tags
/side-1~
1
386 | Author
: A U Thor
<author@example.com
>
390 * commit tags
/side-1~
2
391 | Author
: A U Thor
<author@example.com
>
395 * commit tags
/side-1~
3
396 Author
: A U Thor
<author@example.com
>
401 test_expect_success
'log --graph with full output' '
402 git log --graph --date-order --pretty=short |
403 git name-rev --name-only --stdin |
404 sed "s/Merge:.*/Merge: A B/;s/ *\$//" >actual &&
405 test_cmp expect actual
408 test_expect_success
'set up more tangled history' '
409 git checkout -b tangle HEAD~6 &&
410 test_commit tangle-a tangle-a a &&
411 git merge master~3 &&
413 git checkout master &&
415 git checkout -b reach &&
417 git checkout master &&
418 git checkout -b octopus-a &&
419 test_commit octopus-a &&
420 git checkout master &&
421 git checkout -b octopus-b &&
422 test_commit octopus-b &&
423 git checkout master &&
424 test_commit seventh &&
425 git merge octopus-a octopus-b &&
434 *-. \ Merge tags
'octopus-a' and
'octopus-b'
444 * Merge branch
'tangle'
446 |
* Merge branch
'side' (early part
) into tangle
448 |
* \ Merge branch
'master' (early part
) into tangle
451 * | | | Merge branch
'side'
470 test_expect_success
'log --graph with merge' '
471 git log --graph --date-order --pretty=tformat:%s |
472 sed "s/ *\$//" >actual &&
473 test_cmp expect actual
476 test_expect_success
'log.decorate configuration' '
477 git log --oneline >expect.none &&
478 git log --oneline --decorate >expect.short &&
479 git log --oneline --decorate=full >expect.full &&
481 echo "[log] decorate" >>.git/config &&
482 git log --oneline >actual &&
483 test_cmp expect.short actual &&
485 test_config log.decorate true &&
486 git log --oneline >actual &&
487 test_cmp expect.short actual &&
488 git log --oneline --decorate=full >actual &&
489 test_cmp expect.full actual &&
490 git log --oneline --decorate=no >actual &&
491 test_cmp expect.none actual &&
493 test_config log.decorate no &&
494 git log --oneline >actual &&
495 test_cmp expect.none actual &&
496 git log --oneline --decorate >actual &&
497 test_cmp expect.short actual &&
498 git log --oneline --decorate=full >actual &&
499 test_cmp expect.full actual &&
501 test_config log.decorate 1 &&
502 git log --oneline >actual &&
503 test_cmp expect.short actual &&
504 git log --oneline --decorate=full >actual &&
505 test_cmp expect.full actual &&
506 git log --oneline --decorate=no >actual &&
507 test_cmp expect.none actual &&
509 test_config log.decorate short &&
510 git log --oneline >actual &&
511 test_cmp expect.short actual &&
512 git log --oneline --no-decorate >actual &&
513 test_cmp expect.none actual &&
514 git log --oneline --decorate=full >actual &&
515 test_cmp expect.full actual &&
517 test_config log.decorate full &&
518 git log --oneline >actual &&
519 test_cmp expect.full actual &&
520 git log --oneline --no-decorate >actual &&
521 test_cmp expect.none actual &&
522 git log --oneline --decorate >actual &&
523 test_cmp expect.short actual &&
525 test_unconfig log.decorate &&
526 git log --pretty=raw >expect.raw &&
527 test_config log.decorate full &&
528 git log --pretty=raw >actual &&
529 test_cmp expect.raw actual
533 test_expect_success
'reflog is expected format' '
534 git log -g --abbrev-commit --pretty=oneline >expect &&
535 git reflog >actual &&
536 test_cmp expect actual
539 test_expect_success
'whatchanged is expected format' '
540 git log --no-merges --raw >expect &&
541 git whatchanged >actual &&
542 test_cmp expect actual
545 test_expect_success
'log.abbrevCommit configuration' '
546 git log --abbrev-commit >expect.log.abbrev &&
547 git log --no-abbrev-commit >expect.log.full &&
548 git log --pretty=raw >expect.log.raw &&
549 git reflog --abbrev-commit >expect.reflog.abbrev &&
550 git reflog --no-abbrev-commit >expect.reflog.full &&
551 git whatchanged --abbrev-commit >expect.whatchanged.abbrev &&
552 git whatchanged --no-abbrev-commit >expect.whatchanged.full &&
554 test_config log.abbrevCommit true &&
557 test_cmp expect.log.abbrev actual &&
558 git log --no-abbrev-commit >actual &&
559 test_cmp expect.log.full actual &&
561 git log --pretty=raw >actual &&
562 test_cmp expect.log.raw actual &&
564 git reflog >actual &&
565 test_cmp expect.reflog.abbrev actual &&
566 git reflog --no-abbrev-commit >actual &&
567 test_cmp expect.reflog.full actual &&
569 git whatchanged >actual &&
570 test_cmp expect.whatchanged.abbrev actual &&
571 git whatchanged --no-abbrev-commit >actual &&
572 test_cmp expect.whatchanged.full actual
575 test_expect_success
'show added path under "--follow -M"' '
576 # This tests for a regression introduced in v1.7.2-rc0~103^2~2
577 test_create_repo regression &&
580 test_commit needs-another-commit &&
581 test_commit foo.bar &&
582 git log -M --follow -p foo.bar.t &&
583 git log -M --follow --stat foo.bar.t &&
584 git log -M --follow --name-only foo.bar.t
588 test_expect_success
'git log -c --follow' '
589 test_create_repo follow-c &&
592 test_commit initial file original &&
594 test_commit rename file2 original &&
595 git reset --hard initial &&
596 test_commit modify file foo &&
597 git merge -m merge rename &&
598 git log -c --follow file2
603 * commit COMMIT_OBJECT_NAME
604 |\ Merge
: MERGE_PARENTS
605 | | Author
: A U Thor
<author@example.com
>
607 | | Merge HEADS DESCRIPTION
609 |
* commit COMMIT_OBJECT_NAME
610 | | Author
: A U Thor
<author@example.com
>
615 | |
1 file changed
, 1 insertion
(+)
617 | |
diff --git a
/reach.t b
/reach.t
618 | | new
file mode
100644
619 | | index
0000000.
.10c9591
626 *-. \ commit COMMIT_OBJECT_NAME
627 |\ \ \ Merge
: MERGE_PARENTS
628 | | | | Author
: A U Thor
<author@example.com
>
630 | | | | Merge HEADS DESCRIPTION
632 | |
* | commit COMMIT_OBJECT_NAME
633 | | |
/ Author
: A U Thor
<author@example.com
>
637 | | | octopus-b.t |
1 +
638 | | |
1 file changed
, 1 insertion
(+)
640 | | |
diff --git a
/octopus-b.t b
/octopus-b.t
641 | | | new
file mode
100644
642 | | | index
0000000..d5fcad0
644 | | |
+++ b
/octopus-b.t
648 |
* | commit COMMIT_OBJECT_NAME
649 | |
/ Author
: A U Thor
<author@example.com
>
653 | | octopus-a.t |
1 +
654 | |
1 file changed
, 1 insertion
(+)
656 | |
diff --git a
/octopus-a.t b
/octopus-a.t
657 | | new
file mode
100644
658 | | index
0000000.
.11ee015
660 | |
+++ b
/octopus-a.t
664 * | commit COMMIT_OBJECT_NAME
665 |
/ Author
: A U Thor
<author@example.com
>
670 |
1 file changed
, 1 insertion
(+)
672 |
diff --git a
/seventh.t b
/seventh.t
673 | new
file mode
100644
674 | index
0000000.
.9744ffc
680 * commit COMMIT_OBJECT_NAME
681 |\ Merge
: MERGE_PARENTS
682 | | Author
: A U Thor
<author@example.com
>
684 | | Merge branch
'tangle'
686 |
* commit COMMIT_OBJECT_NAME
687 | |\ Merge
: MERGE_PARENTS
688 | | | Author
: A U Thor
<author@example.com
>
690 | | | Merge branch
'side' (early part
) into tangle
692 |
* | commit COMMIT_OBJECT_NAME
693 | |\ \ Merge
: MERGE_PARENTS
694 | | | | Author
: A U Thor
<author@example.com
>
696 | | | | Merge branch
'master' (early part
) into tangle
698 |
* | | commit COMMIT_OBJECT_NAME
699 | | | | Author
: A U Thor
<author@example.com
>
703 | | | | tangle-a |
1 +
704 | | | |
1 file changed
, 1 insertion
(+)
706 | | | |
diff --git a
/tangle-a b
/tangle-a
707 | | | | new
file mode
100644
708 | | | | index
0000000.
.7898192
709 | | | |
--- /dev
/null
710 | | | |
+++ b
/tangle-a
711 | | | | @@
-0,0 +1 @@
714 * | | | commit COMMIT_OBJECT_NAME
715 |\ \ \ \ Merge
: MERGE_PARENTS
716 | | | | | Author
: A U Thor
<author@example.com
>
718 | | | | | Merge branch
'side'
720 |
* | | | commit COMMIT_OBJECT_NAME
721 | | |_|
/ Author
: A U Thor
<author@example.com
>
726 | | | |
1 file changed
, 1 insertion
(+)
728 | | | |
diff --git a
/2 b
/2
729 | | | | new
file mode
100644
730 | | | | index
0000000.
.0cfbf08
731 | | | |
--- /dev
/null
733 | | | | @@
-0,0 +1 @@
736 |
* | | commit COMMIT_OBJECT_NAME
737 | | | | Author
: A U Thor
<author@example.com
>
742 | | | |
1 file changed
, 1 insertion
(+)
744 | | | |
diff --git a
/1 b
/1
745 | | | | new
file mode
100644
746 | | | | index
0000000..d00491f
747 | | | |
--- /dev
/null
749 | | | | @@
-0,0 +1 @@
752 * | | | commit COMMIT_OBJECT_NAME
753 | | | | Author
: A U Thor
<author@example.com
>
758 | | | |
1 file changed
, 1 insertion
(+)
760 | | | |
diff --git a
/one b
/one
761 | | | | new
file mode
100644
762 | | | | index
0000000.
.9a33383
763 | | | |
--- /dev
/null
765 | | | | @@
-0,0 +1 @@
768 * | | | commit COMMIT_OBJECT_NAME
769 | |_|
/ Author
: A U Thor
<author@example.com
>
774 | | |
1 file changed
, 1 deletion
(-)
776 | | |
diff --git a
/a
/two b
/a
/two
777 | | | deleted
file mode
100644
778 | | | index
9245af5.
.0000000
784 * | | commit COMMIT_OBJECT_NAME
785 | | | Author
: A U Thor
<author@example.com
>
790 | | |
1 file changed
, 1 insertion
(+)
792 | | |
diff --git a
/a
/two b
/a
/two
793 | | | new
file mode
100644
794 | | | index
0000000.
.9245af5
800 * | | commit COMMIT_OBJECT_NAME
801 |
/ / Author
: A U Thor
<author@example.com
>
806 | |
1 file changed
, 1 insertion
(+)
808 | |
diff --git a
/ein b
/ein
809 | | new
file mode
100644
810 | | index
0000000.
.9d7e69f
816 * | commit COMMIT_OBJECT_NAME
817 |
/ Author
: A U Thor
<author@example.com
>
823 |
2 files changed
, 1 insertion
(+), 1 deletion
(-)
825 |
diff --git a
/ichi b
/ichi
826 | new
file mode
100644
827 | index
0000000.
.9d7e69f
832 |
diff --git a
/one b
/one
833 | deleted
file mode
100644
834 | index
9d7e69f.
.0000000
840 * commit COMMIT_OBJECT_NAME
841 | Author
: A U Thor
<author@example.com
>
846 |
1 file changed
, 1 insertion
(+), 1 deletion
(-)
848 |
diff --git a
/one b
/one
849 | index
5626abf.
.9d7e69f
100644
856 * commit COMMIT_OBJECT_NAME
857 Author
: A U Thor
<author@example.com
>
862 1 file changed
, 1 insertion
(+)
864 diff --git a
/one b
/one
866 index
0000000.
.5626abf
875 -e 's/commit [0-9a-f]*$/commit COMMIT_OBJECT_NAME/' \
876 -e 's/Merge: [ 0-9a-f]*$/Merge: MERGE_PARENTS/' \
877 -e 's/Merge tag.*/Merge HEADS DESCRIPTION/' \
878 -e 's/Merge commit.*/Merge HEADS DESCRIPTION/' \
879 -e 's/, 0 deletions(-)//' \
880 -e 's/, 0 insertions(+)//' \
881 -e 's/ 1 files changed, / 1 file changed, /' \
882 -e 's/, 1 deletions(-)/, 1 deletion(-)/' \
883 -e 's/, 1 insertions(+)/, 1 insertion(+)/'
886 test_expect_success
'log --graph with diff and stats' '
887 git log --no-renames --graph --pretty=short --stat -p >actual &&
888 sanitize_output >actual.sanitized <actual &&
889 test_i18ncmp expect actual.sanitized
892 test_expect_success
'dotdot is a parent directory' '
894 ( echo sixth && echo fifth ) >expect &&
895 ( cd a/b && git log --format=%s .. ) >actual &&
896 test_cmp expect actual
899 test_expect_success GPG
'setup signed branch' '
900 test_when_finished "git reset --hard && git checkout master" &&
901 git checkout -b signed master &&
904 git commit -S -m signed_commit
907 test_expect_success GPG
'log --graph --show-signature' '
908 git log --graph --show-signature -n1 signed >actual &&
909 grep "^| gpg: Signature made" actual &&
910 grep "^| gpg: Good signature" actual
913 test_expect_success GPG
'log --graph --show-signature for merged tag' '
914 test_when_finished "git reset --hard && git checkout master" &&
915 git checkout -b plain master &&
918 git commit -m bar_commit &&
919 git checkout -b tagged master &&
922 git commit -m baz_commit &&
923 git tag -s -m signed_tag_msg signed_tag &&
924 git checkout plain &&
925 git merge --no-ff -m msg signed_tag &&
926 git log --graph --show-signature -n1 plain >actual &&
927 grep "^|\\\ merged tag" actual &&
928 grep "^| | gpg: Signature made" actual &&
929 grep "^| | gpg: Good signature" actual
932 test_expect_success GPG
'--no-show-signature overrides --show-signature' '
933 git log -1 --show-signature --no-show-signature signed >actual &&
934 ! grep "^gpg:" actual
937 test_expect_success GPG
'log.showsignature=true behaves like --show-signature' '
938 test_config log.showsignature true &&
939 git log -1 signed >actual &&
940 grep "gpg: Signature made" actual &&
941 grep "gpg: Good signature" actual
944 test_expect_success GPG
'--no-show-signature overrides log.showsignature=true' '
945 test_config log.showsignature true &&
946 git log -1 --no-show-signature signed >actual &&
947 ! grep "^gpg:" actual
950 test_expect_success GPG
'--show-signature overrides log.showsignature=false' '
951 test_config log.showsignature false &&
952 git log -1 --show-signature signed >actual &&
953 grep "gpg: Signature made" actual &&
954 grep "gpg: Good signature" actual
957 test_expect_success
'log --graph --no-walk is forbidden' '
958 test_must_fail git log --graph --no-walk
961 test_expect_success
'log diagnoses bogus HEAD' '
963 test_must_fail git -C empty log 2>stderr &&
964 test_i18ngrep does.not.have.any.commits stderr &&
965 echo 1234abcd >empty/.git/refs/heads/master &&
966 test_must_fail git -C empty log 2>stderr &&
967 test_i18ngrep broken stderr &&
968 echo "ref: refs/heads/invalid.lock" >empty/.git/HEAD &&
969 test_must_fail git -C empty log 2>stderr &&
970 test_i18ngrep broken stderr &&
971 test_must_fail git -C empty log --default totally-bogus 2>stderr &&
972 test_i18ngrep broken stderr
975 test_expect_success
'set up --source tests' '
976 git checkout --orphan source-a &&
979 git checkout -b source-b HEAD^ &&
983 test_expect_success
'log --source paints branch names' '
984 cat >expect <<-\EOF &&
985 09e12a9 source-b three
989 git log --oneline --source source-a source-b >actual &&
990 test_cmp expect actual
993 test_expect_success
'log --source paints tag names' '
994 git tag -m tagged source-tag &&
995 cat >expect <<-\EOF &&
996 09e12a9 source-tag three
998 1ac6c77 source-tag one
1000 git log --oneline --source source-tag source-a >actual &&
1001 test_cmp expect actual