t/*: fix ordering of expected/observed arguments
Fix various places where the ordering was obviously wrong, meaning it was easy to find with grep. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthew DeVore committed
Oct 5, 2018 at 14:54 UTC
dcbaa0b361f5bebcbe6eca446819fadd02083461
32 files changed
+112
-112
t/t0000-basic.sh
+1
-1
@@ -1018,7 +1018,7 @@ test_expect_success SHA1 'validate git diff-files output for a know cache/work t
1018
:120000 120000 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c 0000000000000000000000000000000000000000 M path3/subp3/file3sym
1019
EOF
1020
git diff-files >current &&
1021
- test_cmp current expected
1021
+ test_cmp expected current
1022
'
1023
1024
test_expect_success 'git update-index --refresh should succeed' '
t/t0021-conversion.sh
+2
-2
@@ -166,10 +166,10 @@ test_expect_success expanded_in_repo '
166
rm -f expanded-keywords expanded-keywords-crlf &&
167
168
git checkout -- expanded-keywords &&
169
- test_cmp expanded-keywords expected-output &&
169
+ test_cmp expected-output expanded-keywords &&
170
171
git checkout -- expanded-keywords-crlf &&
172
- test_cmp expanded-keywords-crlf expected-output-crlf
172
+ test_cmp expected-output-crlf expanded-keywords-crlf
173
'
174
175
# The use of %f in a filter definition is expanded to the path to
t/t1300-config.sh
+2
-2
@@ -1001,7 +1001,7 @@ EOF
1001
1002
test_expect_success 'value continued on next line' '
1003
git config --list > result &&
1004
- test_cmp result expect
1004
+ test_cmp expect result
1005
'
1006
1007
cat > .git/config <<\EOF
@@ -1882,7 +1882,7 @@ test_expect_success '--replace-all does not invent newlines' '
1882
Qkey = b
1883
EOF
1884
git config --replace-all abc.key b &&
1885
- test_cmp .git/config expect
1885
+ test_cmp expect .git/config
1886
'
1887
1888
test_done
t/t1303-wacky-config.sh
+2
-2
@@ -14,7 +14,7 @@ setup() {
14
check() {
15
echo "$2" >expected
16
git config --get "$1" >actual 2>&1
17
- test_cmp actual expected
17
+ test_cmp expected actual
18
}
19
20
# 'check section.key regex value' verifies that the entry for
@@ -22,7 +22,7 @@ check() {
22
check_regex() {
23
echo "$3" >expected
24
git config --get "$1" "$2" >actual 2>&1
25
- test_cmp actual expected
25
+ test_cmp expected actual
26
}
27
28
test_expect_success 'modify same key' '
t/t2101-update-index-reupdate.sh
+1
-1
@@ -73,7 +73,7 @@ test_expect_success 'update-index --update from subdir' '
73
100644 $(git hash-object dir1/file3) 0 dir1/file3
74
100644 $file2 0 file2
75
EOF
76
- test_cmp current expected
76
+ test_cmp expected current
77
'
78
79
test_expect_success 'update-index --update with pathspec' '
t/t3200-branch.sh
+1
-1
@@ -1221,7 +1221,7 @@ test_expect_success 'use --edit-description' '
1221
EOF
1222
EDITOR=./editor git branch --edit-description &&
1223
echo "New contents" >expect &&
1224
- test_cmp EDITOR_OUTPUT expect
1224
+ test_cmp expect EDITOR_OUTPUT
1225
'
1226
1227
test_expect_success 'detect typo in branch name when using --edit-description' '
t/t3320-notes-merge-worktrees.sh
+2
-2
@@ -44,7 +44,7 @@ test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '
44
git config core.notesRef refs/notes/y &&
45
test_must_fail git notes merge z &&
46
echo "ref: refs/notes/y" >expect &&
47
- test_cmp .git/NOTES_MERGE_REF expect
47
+ test_cmp expect .git/NOTES_MERGE_REF
48
'
49
50
test_expect_success 'merge z into y while mid-merge in another workdir fails' '
@@ -66,7 +66,7 @@ test_expect_success 'merge z into x while mid-merge on y succeeds' '
66
grep -v "A notes merge into refs/notes/x is already in-progress in" out
67
) &&
68
echo "ref: refs/notes/x" >expect &&
69
- test_cmp .git/worktrees/worktree2/NOTES_MERGE_REF expect
69
+ test_cmp expect .git/worktrees/worktree2/NOTES_MERGE_REF
70
'
71
72
test_done
t/t3400-rebase.sh
+4
-4
@@ -183,13 +183,13 @@ test_expect_success 'cherry-picked commits and fork-point work together' '
183
test_commit final_B B "Final B" &&
184
git rebase &&
185
echo Amended >expect &&
186
- test_cmp A expect &&
186
+ test_cmp expect A &&
187
echo "Final B" >expect &&
188
- test_cmp B expect &&
188
+ test_cmp expect B &&
189
echo C >expect &&
190
- test_cmp C expect &&
190
+ test_cmp expect C &&
191
echo D >expect &&
192
- test_cmp D expect
192
+ test_cmp expect D
193
'
194
195
test_expect_success 'rebase -q is quiet' '
t/t3417-rebase-whitespace-fix.sh
+3
-3
@@ -55,7 +55,7 @@ test_expect_success 'blank line at end of file; extend at end of file' '
55
git add file && git commit -m second &&
56
git rebase --whitespace=fix HEAD^^ &&
57
git diff --exit-code HEAD^:file expect-first &&
58
- test_cmp file expect-second
58
+ test_cmp expect-second file
59
'
60
61
# prepare third revision of "file"
@@ -82,7 +82,7 @@ test_expect_success 'two blanks line at end of file; extend at end of file' '
82
cp third file && git add file && git commit -m third &&
83
git rebase --whitespace=fix HEAD^^ &&
84
git diff --exit-code HEAD^:file expect-second &&
85
- test_cmp file expect-third
85
+ test_cmp expect-third file
86
'
87
88
test_expect_success 'same, but do not remove trailing spaces' '
@@ -120,7 +120,7 @@ test_expect_success 'at beginning of file' '
120
done >> file &&
121
git commit -m more file &&
122
git rebase --whitespace=fix HEAD^^ &&
123
- test_cmp file expect-beginning
123
+ test_cmp expect-beginning file
124
'
125
126
test_done
t/t3702-add-edit.sh
+2
-2
@@ -110,10 +110,10 @@ test_expect_success 'add -e' '
110
cp second-part file &&
111
git add -e &&
112
test_cmp second-part file &&
113
- test_cmp orig-patch expected-patch &&
113
+ test_cmp expected-patch orig-patch &&
114
git diff --cached >actual &&
115
grep -v index actual >out &&
116
- test_cmp out expected
116
+ test_cmp expected out
117
118
'
119
t/t3903-stash.sh
+4
-4
@@ -36,7 +36,7 @@ EOF
36
test_expect_success 'parents of stash' '
37
test $(git rev-parse stash^) = $(git rev-parse HEAD) &&
38
git diff stash^2..stash > output &&
39
- test_cmp output expect
39
+ test_cmp expect output
40
'
41
42
test_expect_success 'applying bogus stash does nothing' '
@@ -210,9 +210,9 @@ test_expect_success 'stash branch' '
210
test refs/heads/stashbranch = $(git symbolic-ref HEAD) &&
211
test $(git rev-parse HEAD) = $(git rev-parse master^) &&
212
git diff --cached > output &&
213
- test_cmp output expect &&
213
+ test_cmp expect output &&
214
git diff > output &&
215
- test_cmp output expect1 &&
215
+ test_cmp expect1 output &&
216
git add file &&
217
git commit -m alternate\ second &&
218
git diff master..stashbranch > output &&
@@ -710,7 +710,7 @@ test_expect_success 'stash where working directory contains "HEAD" file' '
710
git diff-index --cached --quiet HEAD &&
711
test "$(git rev-parse stash^)" = "$(git rev-parse HEAD)" &&
712
git diff stash^..stash > output &&
713
- test_cmp output expect
713
+ test_cmp expect output
714
'
715
716
test_expect_success 'store called with invalid commit' '
t/t3905-stash-include-untracked.sh
+1
-1
@@ -142,7 +142,7 @@ test_expect_success 'stash save --include-untracked removed files' '
142
rm -f file &&
143
git stash save --include-untracked &&
144
echo 1 > expect &&
145
- test_cmp file expect
145
+ test_cmp expect file
146
'
147
148
rm -f expect
t/t4025-hunk-header.sh
+1
-1
@@ -37,7 +37,7 @@ test_expect_success 'hunk header truncation with an overly long line' '
37
echo " A $N$N$N$N$N$N$N$N$N2" &&
38
echo " L $N$N$N$N$N$N$N$N$N1"
39
) >expected &&
40
- test_cmp actual expected
40
+ test_cmp expected actual
41
42
'
43
t/t4117-apply-reject.sh
+3
-3
@@ -72,7 +72,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
72
rm -f file1.rej file2.rej &&
73
74
test_must_fail git apply --reject patch.1 &&
75
- test_cmp file1 expected &&
75
+ test_cmp expected file1 &&
76
77
cat file1.rej &&
78
test_path_is_missing file2.rej
@@ -85,7 +85,7 @@ test_expect_success 'apply with --reject should fail but update the file' '
85
86
test_must_fail git apply --reject patch.2 >rejects &&
87
test_path_is_missing file1 &&
88
- test_cmp file2 expected &&
88
+ test_cmp expected file2 &&
89
90
cat file2.rej &&
91
test_path_is_missing file1.rej
@@ -99,7 +99,7 @@ test_expect_success 'the same test with --verbose' '
99
100
test_must_fail git apply --reject --verbose patch.2 >rejects &&
101
test_path_is_missing file1 &&
102
- test_cmp file2 expected &&
102
+ test_cmp expected file2 &&
103
104
cat file2.rej &&
105
test_path_is_missing file1.rej
t/t4124-apply-ws-rule.sh
+15
-15
@@ -313,9 +313,9 @@ test_expect_success 'applying beyond EOF requires one non-blank context line' '
313
{ echo a; echo; } >one &&
314
cp one expect &&
315
test_must_fail git apply --whitespace=fix patch &&
316
- test_cmp one expect &&
316
+ test_cmp expect one &&
317
test_must_fail git apply --ignore-space-change --whitespace=fix patch &&
318
- test_cmp one expect
318
+ test_cmp expect one
319
'
320
321
test_expect_success 'tons of blanks at EOF should not apply' '
@@ -342,10 +342,10 @@ test_expect_success 'missing blank line at end with --whitespace=fix' '
342
cp one saved-one &&
343
test_must_fail git apply patch &&
344
git apply --whitespace=fix patch &&
345
- test_cmp one expect &&
345
+ test_cmp expect one &&
346
mv saved-one one &&
347
git apply --ignore-space-change --whitespace=fix patch &&
348
- test_cmp one expect
348
+ test_cmp expect one
349
'
350
351
test_expect_success 'two missing blank lines at end with --whitespace=fix' '
@@ -360,11 +360,11 @@ test_expect_success 'two missing blank lines at end with --whitespace=fix' '
360
cp no-blank-lines one &&
361
test_must_fail git apply patch &&
362
git apply --whitespace=fix patch &&
363
- test_cmp one expect &&
363
+ test_cmp expect one &&
364
mv no-blank-lines one &&
365
test_must_fail git apply patch &&
366
git apply --ignore-space-change --whitespace=fix patch &&
367
- test_cmp one expect
367
+ test_cmp expect one
368
'
369
370
test_expect_success 'missing blank line at end, insert before end, --whitespace=fix' '
@@ -376,7 +376,7 @@ test_expect_success 'missing blank line at end, insert before end, --whitespace=
376
echo a >one &&
377
test_must_fail git apply patch &&
378
git apply --whitespace=fix patch &&
379
- test_cmp one expect
379
+ test_cmp expect one
380
'
381
382
test_expect_success 'shrink file with tons of missing blanks at end of file' '
@@ -392,10 +392,10 @@ test_expect_success 'shrink file with tons of missing blanks at end of file' '
392
cp no-blank-lines one &&
393
test_must_fail git apply patch &&
394
git apply --whitespace=fix patch &&
395
- test_cmp one expect &&
395
+ test_cmp expect one &&
396
mv no-blank-lines one &&
397
git apply --ignore-space-change --whitespace=fix patch &&
398
- test_cmp one expect
398
+ test_cmp expect one
399
'
400
401
test_expect_success 'missing blanks at EOF must only match blank lines' '
@@ -427,7 +427,7 @@ test_expect_success 'missing blank line should match context line with spaces' '
427
git add one &&
428
429
git apply --whitespace=fix patch &&
430
- test_cmp one expect
430
+ test_cmp expect one
431
'
432
433
sed -e's/Z//' >one <<EOF
@@ -447,7 +447,7 @@ test_expect_success 'same, but with the --ignore-space-option' '
447
448
git checkout-index -f one &&
449
git apply --ignore-space-change --whitespace=fix patch &&
450
- test_cmp one expect
450
+ test_cmp expect one
451
'
452
453
test_expect_success 'same, but with CR-LF line endings && cr-at-eol set' '
@@ -464,7 +464,7 @@ test_expect_success 'same, but with CR-LF line endings && cr-at-eol set' '
464
mv save-one one &&
465
466
git apply --ignore-space-change --whitespace=fix patch &&
467
- test_cmp one expect
467
+ test_cmp expect one
468
'
469
470
test_expect_success 'CR-LF line endings && add line && text=auto' '
@@ -478,7 +478,7 @@ test_expect_success 'CR-LF line endings && add line && text=auto' '
478
mv save-one one &&
479
echo "one text=auto" >.gitattributes &&
480
git apply patch &&
481
- test_cmp one expect
481
+ test_cmp expect one
482
'
483
484
test_expect_success 'CR-LF line endings && change line && text=auto' '
@@ -491,7 +491,7 @@ test_expect_success 'CR-LF line endings && change line && text=auto' '
491
mv save-one one &&
492
echo "one text=auto" >.gitattributes &&
493
git apply patch &&
494
- test_cmp one expect
494
+ test_cmp expect one
495
'
496
497
test_expect_success 'LF in repo, CRLF in worktree && change line && text=auto' '
@@ -503,7 +503,7 @@ test_expect_success 'LF in repo, CRLF in worktree && change line && text=auto' '
503
echo "one text=auto" >.gitattributes &&
504
git -c core.eol=CRLF apply patch &&
505
printf "b\r\n" >expect &&
506
- test_cmp one expect
506
+ test_cmp expect one
507
'
508
509
test_expect_success 'whitespace=fix to expand' '
t/t4138-apply-ws-expansion.sh
+1
-1
@@ -114,7 +114,7 @@ for t in 1 2 3 4
114
do
115
test_expect_success 'apply with ws expansion (t=$t)' '
116
git apply patch$t.patch &&
117
- test_cmp test-$t expect-$t
117
+ test_cmp expect-$t test-$t
118
'
119
done
120
t/t5317-pack-objects-filter-objects.sh
+17
-17
@@ -34,7 +34,7 @@ test_expect_success 'verify blob count in normal packfile' '
34
awk -f print_1.awk |
35
sort >observed &&
36
37
- test_cmp observed expected
37
+ test_cmp expected observed
38
'
39
40
test_expect_success 'verify blob:none packfile has no blobs' '
@@ -63,7 +63,7 @@ test_expect_success 'verify normal and blob:none packfiles have same commits/tre
63
awk -f print_1.awk |
64
sort >observed &&
65
66
- test_cmp observed expected
66
+ test_cmp expected observed
67
'
68
69
# Test blob:limit=<n>[kmg] filter.
@@ -96,7 +96,7 @@ test_expect_success 'verify blob count in normal packfile' '
96
awk -f print_1.awk |
97
sort >observed &&
98
99
- test_cmp observed expected
99
+ test_cmp expected observed
100
'
101
102
test_expect_success 'verify blob:limit=500 omits all blobs' '
@@ -144,7 +144,7 @@ test_expect_success 'verify blob:limit=1001' '
144
awk -f print_1.awk |
145
sort >observed &&
146
147
- test_cmp observed expected
147
+ test_cmp expected observed
148
'
149
150
test_expect_success 'verify blob:limit=10001' '
@@ -162,7 +162,7 @@ test_expect_success 'verify blob:limit=10001' '
162
awk -f print_1.awk |
163
sort >observed &&
164
165
- test_cmp observed expected
165
+ test_cmp expected observed
166
'
167
168
test_expect_success 'verify blob:limit=1k' '
@@ -180,7 +180,7 @@ test_expect_success 'verify blob:limit=1k' '
180
awk -f print_1.awk |
181
sort >observed &&
182
183
- test_cmp observed expected
183
+ test_cmp expected observed
184
'
185
186
test_expect_success 'verify explicitly specifying oversized blob in input' '
@@ -199,7 +199,7 @@ test_expect_success 'verify explicitly specifying oversized blob in input' '
199
awk -f print_1.awk |
200
sort >observed &&
201
202
- test_cmp observed expected
202
+ test_cmp expected observed
203
'
204
205
test_expect_success 'verify blob:limit=1m' '
@@ -217,7 +217,7 @@ test_expect_success 'verify blob:limit=1m' '
217
awk -f print_1.awk |
218
sort >observed &&
219
220
- test_cmp observed expected
220
+ test_cmp expected observed
221
'
222
223
test_expect_success 'verify normal and blob:limit packfiles have same commits/trees' '
@@ -231,7 +231,7 @@ test_expect_success 'verify normal and blob:limit packfiles have same commits/tr
231
awk -f print_1.awk |
232
sort >observed &&
233
234
- test_cmp observed expected
234
+ test_cmp expected observed
235
'
236
237
# Test sparse:path=<path> filter.
@@ -269,7 +269,7 @@ test_expect_success 'verify blob count in normal packfile' '
269
awk -f print_1.awk |
270
sort >observed &&
271
272
- test_cmp observed expected
272
+ test_cmp expected observed
273
'
274
275
test_expect_success 'verify sparse:path=pattern1' '
@@ -287,7 +287,7 @@ test_expect_success 'verify sparse:path=pattern1' '
287
awk -f print_1.awk |
288
sort >observed &&
289
290
- test_cmp observed expected
290
+ test_cmp expected observed
291
'
292
293
test_expect_success 'verify normal and sparse:path=pattern1 packfiles have same commits/trees' '
@@ -301,7 +301,7 @@ test_expect_success 'verify normal and sparse:path=pattern1 packfiles have same
301
awk -f print_1.awk |
302
sort >observed &&
303
304
- test_cmp observed expected
304
+ test_cmp expected observed
305
'
306
307
test_expect_success 'verify sparse:path=pattern2' '
@@ -319,7 +319,7 @@ test_expect_success 'verify sparse:path=pattern2' '
319
awk -f print_1.awk |
320
sort >observed &&
321
322
- test_cmp observed expected
322
+ test_cmp expected observed
323
'
324
325
test_expect_success 'verify normal and sparse:path=pattern2 packfiles have same commits/trees' '
@@ -333,7 +333,7 @@ test_expect_success 'verify normal and sparse:path=pattern2 packfiles have same
333
awk -f print_1.awk |
334
sort >observed &&
335
336
- test_cmp observed expected
336
+ test_cmp expected observed
337
'
338
339
# Test sparse:oid=<oid-ish> filter.
@@ -370,7 +370,7 @@ test_expect_success 'verify blob count in normal packfile' '
370
awk -f print_1.awk |
371
sort >observed &&
372
373
- test_cmp observed expected
373
+ test_cmp expected observed
374
'
375
376
test_expect_success 'verify sparse:oid=OID' '
@@ -389,7 +389,7 @@ test_expect_success 'verify sparse:oid=OID' '
389
awk -f print_1.awk |
390
sort >observed &&
391
392
- test_cmp observed expected
392
+ test_cmp expected observed
393
'
394
395
test_expect_success 'verify sparse:oid=oid-ish' '
@@ -407,7 +407,7 @@ test_expect_success 'verify sparse:oid=oid-ish' '
407
awk -f print_1.awk |
408
sort >observed &&
409
410
- test_cmp observed expected
410
+ test_cmp expected observed
411
'
412
413
# Delete some loose objects and use pack-objects, but WITHOUT any filtering.
t/t5318-commit-graph.sh
+1
-1
@@ -35,7 +35,7 @@ test_expect_success 'create commits and repack' '
35
graph_git_two_modes() {
36
git -c core.commitGraph=true $1 >output
37
git -c core.commitGraph=false $1 >expect
38
- test_cmp output expect
38
+ test_cmp expect output
39
}
40
41
graph_git_behavior() {
t/t5701-git-serve.sh
+7
-7
@@ -16,7 +16,7 @@ test_expect_success 'test capability advertisement' '
16
17
git serve --advertise-capabilities >out &&
18
test-pkt-line unpack <out >actual &&
19
- test_cmp actual expect
19
+ test_cmp expect actual
20
'
21
22
test_expect_success 'stateless-rpc flag does not list capabilities' '
@@ -89,7 +89,7 @@ test_expect_success 'basics of ls-refs' '
89
90
git serve --stateless-rpc <in >out &&
91
test-pkt-line unpack <out >actual &&
92
- test_cmp actual expect
92
+ test_cmp expect actual
93
'
94
95
test_expect_success 'basic ref-prefixes' '
@@ -109,7 +109,7 @@ test_expect_success 'basic ref-prefixes' '
109
110
git serve --stateless-rpc <in >out &&
111
test-pkt-line unpack <out >actual &&
112
- test_cmp actual expect
112
+ test_cmp expect actual
113
'
114
115
test_expect_success 'refs/heads prefix' '
@@ -129,7 +129,7 @@ test_expect_success 'refs/heads prefix' '
129
130
git serve --stateless-rpc <in >out &&
131
test-pkt-line unpack <out >actual &&
132
- test_cmp actual expect
132
+ test_cmp expect actual
133
'
134
135
test_expect_success 'peel parameter' '
@@ -150,7 +150,7 @@ test_expect_success 'peel parameter' '
150
151
git serve --stateless-rpc <in >out &&
152
test-pkt-line unpack <out >actual &&
153
- test_cmp actual expect
153
+ test_cmp expect actual
154
'
155
156
test_expect_success 'symrefs parameter' '
@@ -171,7 +171,7 @@ test_expect_success 'symrefs parameter' '
171
172
git serve --stateless-rpc <in >out &&
173
test-pkt-line unpack <out >actual &&
174
- test_cmp actual expect
174
+ test_cmp expect actual
175
'
176
177
test_expect_success 'sending server-options' '
@@ -191,7 +191,7 @@ test_expect_success 'sending server-options' '
191
192
git serve --stateless-rpc <in >out &&
193
test-pkt-line unpack <out >actual &&
194
- test_cmp actual expect
194
+ test_cmp expect actual
195
'
196
197
test_expect_success 'unexpected lines are not allowed in fetch request' '
t/t5702-protocol-v2.sh
+5
-5
@@ -29,7 +29,7 @@ test_expect_success 'list refs with git:// using protocol v2' '
29
grep "git< version 2" log &&
30
31
git ls-remote --symref "$GIT_DAEMON_URL/parent" >expect &&
32
- test_cmp actual expect
32
+ test_cmp expect actual
33
'
34
35
test_expect_success 'ref advertisment is filtered with ls-remote using protocol v2' '
@@ -42,7 +42,7 @@ test_expect_success 'ref advertisment is filtered with ls-remote using protocol
42
$(git -C "$daemon_parent" rev-parse refs/heads/master)$(printf "\t")refs/heads/master
43
EOF
44
45
- test_cmp actual expect
45
+ test_cmp expect actual
46
'
47
48
test_expect_success 'clone with git:// using protocol v2' '
@@ -138,7 +138,7 @@ test_expect_success 'list refs with file:// using protocol v2' '
138
grep "git< version 2" log &&
139
140
git ls-remote --symref "file://$(pwd)/file_parent" >expect &&
141
- test_cmp actual expect
141
+ test_cmp expect actual
142
'
143
144
test_expect_success 'ref advertisment is filtered with ls-remote using protocol v2' '
@@ -151,7 +151,7 @@ test_expect_success 'ref advertisment is filtered with ls-remote using protocol
151
$(git -C file_parent rev-parse refs/heads/master)$(printf "\t")refs/heads/master
152
EOF
153
154
- test_cmp actual expect
154
+ test_cmp expect actual
155
'
156
157
test_expect_success 'server-options are sent when using ls-remote' '
@@ -164,7 +164,7 @@ test_expect_success 'server-options are sent when using ls-remote' '
164
$(git -C file_parent rev-parse refs/heads/master)$(printf "\t")refs/heads/master
165
EOF
166
167
- test_cmp actual expect &&
167
+ test_cmp expect actual &&
168
grep "server-option=hello" log &&
169
grep "server-option=world" log
170
'
t/t6023-merge-file.sh
+6
-6
@@ -99,7 +99,7 @@ EOF
99
printf "propter nomen suum." >> expect.txt
100
101
test_expect_success "merge does not add LF away of change" \
102
- "test_cmp test3.txt expect.txt"
102
+ "test_cmp expect.txt test3.txt"
103
104
cp test.txt backup.txt
105
test_expect_success "merge with conflicts" \
@@ -122,7 +122,7 @@ non timebo mala, quoniam tu mecum es:
122
virga tua et baculus tuus ipsa me consolata sunt.
123
EOF
124
125
-test_expect_success "expected conflict markers" "test_cmp test.txt expect.txt"
125
+test_expect_success "expected conflict markers" "test_cmp expect.txt test.txt"
126
127
cp backup.txt test.txt
128
@@ -138,7 +138,7 @@ non timebo mala, quoniam tu mecum es:
138
virga tua et baculus tuus ipsa me consolata sunt.
139
EOF
140
test_expect_success "merge conflicting with --ours" \
141
- "git merge-file --ours test.txt orig.txt new3.txt && test_cmp test.txt expect.txt"
141
+ "git merge-file --ours test.txt orig.txt new3.txt && test_cmp expect.txt test.txt"
142
cp backup.txt test.txt
143
144
cat > expect.txt << EOF
@@ -154,7 +154,7 @@ non timebo mala, quoniam tu mecum es:
154
virga tua et baculus tuus ipsa me consolata sunt.
155
EOF
156
test_expect_success "merge conflicting with --theirs" \
157
- "git merge-file --theirs test.txt orig.txt new3.txt && test_cmp test.txt expect.txt"
157
+ "git merge-file --theirs test.txt orig.txt new3.txt && test_cmp expect.txt test.txt"
158
cp backup.txt test.txt
159
160
cat > expect.txt << EOF
@@ -171,7 +171,7 @@ non timebo mala, quoniam tu mecum es:
171
virga tua et baculus tuus ipsa me consolata sunt.
172
EOF
173
test_expect_success "merge conflicting with --union" \
174
- "git merge-file --union test.txt orig.txt new3.txt && test_cmp test.txt expect.txt"
174
+ "git merge-file --union test.txt orig.txt new3.txt && test_cmp expect.txt test.txt"
175
cp backup.txt test.txt
176
177
test_expect_success "merge with conflicts, using -L" \
@@ -195,7 +195,7 @@ virga tua et baculus tuus ipsa me consolata sunt.
195
EOF
196
197
test_expect_success "expected conflict markers, with -L" \
198
- "test_cmp test.txt expect.txt"
198
+ "test_cmp expect.txt test.txt"
199
200
sed "s/ tu / TU /" < new1.txt > new5.txt
201
test_expect_success "conflict in removed tail" \
t/t6027-merge-binary.sh
+2
-2
@@ -45,7 +45,7 @@ test_expect_success resolve '
45
false
46
else
47
git ls-files -s >current
48
- test_cmp current expect
48
+ test_cmp expect current
49
fi
50
'
51
@@ -60,7 +60,7 @@ test_expect_success recursive '
60
false
61
else
62
git ls-files -s >current
63
- test_cmp current expect
63
+ test_cmp expect current
64
fi
65
'
66
t/t6031-merge-filemode.sh
+1
-1
@@ -61,7 +61,7 @@ do_both_modes () {
61
git checkout -f a2 &&
62
test_must_fail git merge -s $strategy b2 &&
63
git ls-files -u >actual &&
64
- test_cmp actual expect &&
64
+ test_cmp expect actual &&
65
git ls-files -s file2 | grep ^100755
66
'
67
t/t6112-rev-list-filters-objects.sh
+12
-12
@@ -29,7 +29,7 @@ test_expect_success 'verify blob:none omits all 5 blobs' '
29
sed "s/~//" |
30
sort >observed &&
31
32
- test_cmp observed expected
32
+ test_cmp expected observed
33
'
34
35
test_expect_success 'verify emitted+omitted == all' '
@@ -42,7 +42,7 @@ test_expect_success 'verify emitted+omitted == all' '
42
sed "s/~//" |
43
sort >observed &&
44
45
- test_cmp observed expected
45
+ test_cmp expected observed
46
'
47
48
@@ -71,7 +71,7 @@ test_expect_success 'verify blob:limit=500 omits all blobs' '
71
sed "s/~//" |
72
sort >observed &&
73
74
- test_cmp observed expected
74
+ test_cmp expected observed
75
'
76
77
test_expect_success 'verify emitted+omitted == all' '
@@ -84,7 +84,7 @@ test_expect_success 'verify emitted+omitted == all' '
84
sed "s/~//" |
85
sort >observed &&
86
87
- test_cmp observed expected
87
+ test_cmp expected observed
88
'
89
90
test_expect_success 'verify blob:limit=1000' '
@@ -97,7 +97,7 @@ test_expect_success 'verify blob:limit=1000' '
97
sed "s/~//" |
98
sort >observed &&
99
100
- test_cmp observed expected
100
+ test_cmp expected observed
101
'
102
103
test_expect_success 'verify blob:limit=1001' '
@@ -110,7 +110,7 @@ test_expect_success 'verify blob:limit=1001' '
110
sed "s/~//" |
111
sort >observed &&
112
113
- test_cmp observed expected
113
+ test_cmp expected observed
114
'
115
116
test_expect_success 'verify blob:limit=1k' '
@@ -123,7 +123,7 @@ test_expect_success 'verify blob:limit=1k' '
123
sed "s/~//" |
124
sort >observed &&
125
126
- test_cmp observed expected
126
+ test_cmp expected observed
127
'
128
129
test_expect_success 'verify blob:limit=1m' '
@@ -165,7 +165,7 @@ test_expect_success 'verify sparse:path=pattern1 omits top-level files' '
165
sed "s/~//" |
166
sort >observed &&
167
168
- test_cmp observed expected
168
+ test_cmp expected observed
169
'
170
171
test_expect_success 'verify sparse:path=pattern2 omits both sparse2 files' '
@@ -178,7 +178,7 @@ test_expect_success 'verify sparse:path=pattern2 omits both sparse2 files' '
178
sed "s/~//" |
179
sort >observed &&
180
181
- test_cmp observed expected
181
+ test_cmp expected observed
182
'
183
184
# Test sparse:oid=<oid-ish> filter.
@@ -203,7 +203,7 @@ test_expect_success 'verify sparse:oid=OID omits top-level files' '
203
sed "s/~//" |
204
sort >observed &&
205
206
- test_cmp observed expected
206
+ test_cmp expected observed
207
'
208
209
test_expect_success 'verify sparse:oid=oid-ish omits top-level files' '
@@ -216,7 +216,7 @@ test_expect_success 'verify sparse:oid=oid-ish omits top-level files' '
216
sed "s/~//" |
217
sort >observed &&
218
219
- test_cmp observed expected
219
+ test_cmp expected observed
220
'
221
222
# Delete some loose objects and use rev-list, but WITHOUT any filtering.
@@ -237,7 +237,7 @@ test_expect_success 'rev-list W/ --missing=print' '
237
sed "s/?//" |
238
sort >observed &&
239
240
- test_cmp observed expected
240
+ test_cmp expected observed
241
'
242
243
test_expect_success 'rev-list W/O --missing fails' '
t/t7201-co.sh
+2
-2
@@ -160,7 +160,7 @@ test_expect_success 'checkout -m with merge conflict' '
160
git diff master:one :3:uno |
161
sed -e "1,/^@@/d" -e "/^ /d" -e "s/^-/d/" -e "s/^+/a/" >current &&
162
fill d2 aT d7 aS >expect &&
163
- test_cmp current expect &&
163
+ test_cmp expect current &&
164
git diff --cached two >current &&
165
test_must_be_empty current
166
'
@@ -174,7 +174,7 @@ test_expect_success 'format of merge conflict from checkout -m' '
174
175
git ls-files >current &&
176
fill same two two two >expect &&
177
- test_cmp current expect &&
177
+ test_cmp expect current &&
178
179
cat <<-EOF >expect &&
180
<<<<<<< simple
t/t7406-submodule-update.sh
+4
-4
@@ -789,7 +789,7 @@ test_expect_success 'submodule add places git-dir in superprojects git-dir' '
789
(cd .git/modules/deeper/submodule &&
790
git log > ../../../../actual
791
) &&
792
- test_cmp actual expected
792
+ test_cmp expected actual
793
)
794
'
795
@@ -807,7 +807,7 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir' '
807
(cd .git/modules/deeper/submodule &&
808
git log > ../../../../actual
809
) &&
810
- test_cmp actual expected
810
+ test_cmp expected actual
811
)
812
'
813
@@ -827,7 +827,7 @@ test_expect_success 'submodule add places git-dir in superprojects git-dir recur
827
git add deeper/submodule &&
828
git commit -m "update submodule" &&
829
git push origin : &&
830
- test_cmp actual expected
830
+ test_cmp expected actual
831
)
832
'
833
@@ -874,7 +874,7 @@ test_expect_success 'submodule update places git-dir in superprojects git-dir re
874
(cd .git/modules/submodule/modules/subsubmodule &&
875
git log > ../../../../../actual
876
) &&
877
- test_cmp actual expected
877
+ test_cmp expected actual
878
)
879
'
880
t/t7800-difftool.sh
+1
-1
@@ -557,7 +557,7 @@ test_expect_success SYMLINKS 'difftool --dir-diff --symlink without unstaged cha
557
EOF
558
git difftool --dir-diff --symlink \
559
--extcmd "./.git/CHECK_SYMLINKS" branch HEAD &&
560
- test_cmp actual expect
560
+ test_cmp expect actual
561
'
562
563
write_script modify-right-file <<\EOF
t/t9100-git-svn-basic.sh
+1
-1
@@ -221,7 +221,7 @@ tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e
221
tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4
222
EOF
223
224
-test_expect_success POSIXPERM,SYMLINKS "$name" "test_cmp a expected"
224
+test_expect_success POSIXPERM,SYMLINKS "$name" "test_cmp expected a"
225
226
test_expect_success 'exit if remote refs are ambigious' '
227
git config --add svn-remote.svn.fetch \
t/t9133-git-svn-nested-git-repo.sh
+3
-3
@@ -45,7 +45,7 @@ test_expect_success 'update git svn-cloned repo' '
45
git svn rebase &&
46
echo a > expect &&
47
echo b >> expect &&
48
- test_cmp a expect &&
48
+ test_cmp expect a &&
49
rm expect
50
)
51
'
@@ -69,7 +69,7 @@ test_expect_success 'update git svn-cloned repo' '
69
git svn rebase &&
70
echo a > expect &&
71
echo b >> expect &&
72
- test_cmp a expect &&
72
+ test_cmp expect a &&
73
rm expect
74
)
75
'
@@ -93,7 +93,7 @@ test_expect_success 'update git svn-cloned repo again' '
93
echo a > expect &&
94
echo b >> expect &&
95
echo c >> expect &&
96
- test_cmp a expect &&
96
+ test_cmp expect a &&
97
rm expect
98
)
99
'
t/t9600-cvsimport.sh
+1
-1
@@ -148,7 +148,7 @@ test_expect_success PERL 'import from a CVS working tree' '
148
git cvsimport -a -z0 &&
149
echo 1 >expect &&
150
git log -1 --pretty=format:%s%n >actual &&
151
- test_cmp actual expect
151
+ test_cmp expect actual
152
)
153
154
'
t/t9603-cvsimport-patchsets.sh
+2
-2
@@ -29,11 +29,11 @@ test_expect_failure PERL 'import with criss cross times on revisions' '
29
Rev 3
30
Rev 2
31
Rev 1" > expect-master &&
32
- test_cmp actual-master expect-master &&
32
+ test_cmp expect-master actual-master &&
33
34
echo "Rev 5 Branch A Wed Mar 11 19:09:10 2009 +0000
35
Rev 4 Branch A Wed Mar 11 19:03:52 2009 +0000" > expect-A &&
36
- test_cmp actual-A expect-A
36
+ test_cmp expect-A actual-A
37
'
38
39
test_done
t/t9604-cvsimport-timestamps.sh
+2
-2
@@ -31,7 +31,7 @@ test_expect_success PERL 'check timestamps are UTC (TZ=CST6CDT)' '
31
Rev 2 2005-02-01 00:00:00 +0000
32
Rev 1 2005-01-01 00:00:00 +0000
33
EOF
34
- test_cmp actual-1 expect-1
34
+ test_cmp expect-1 actual-1
35
'
36
37
test_expect_success PERL 'check timestamps with author-specific timezones' '
@@ -65,7 +65,7 @@ test_expect_success PERL 'check timestamps with author-specific timezones' '
65
Rev 2 2005-01-31 18:00:00 -0600 User Two
66
Rev 1 2005-01-01 00:00:00 +0000 User One
67
EOF
68
- test_cmp actual-2 expect-2
68
+ test_cmp expect-2 actual-2
69
'
70
71
test_done