File tree Expand file tree Collapse file tree 7 files changed +24
-12
lines changed Expand file tree Collapse file tree 7 files changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ test_expect_success 'reset should remove remnants from a failed merge' '
41
41
git ls-files -s &&
42
42
read_tree_u_must_succeed --reset -u HEAD &&
43
43
git ls-files -s >actual &&
44
- ! test -f old
44
+ ! test -f old &&
45
+ test_cmp expect actual
45
46
'
46
47
47
48
test_expect_success ' two-way reset should remove remnants too' '
@@ -56,7 +57,8 @@ test_expect_success 'two-way reset should remove remnants too' '
56
57
git ls-files -s &&
57
58
read_tree_u_must_succeed --reset -u HEAD HEAD &&
58
59
git ls-files -s >actual &&
59
- ! test -f old
60
+ ! test -f old &&
61
+ test_cmp expect actual
60
62
'
61
63
62
64
test_expect_success ' Porcelain reset should remove remnants too' '
@@ -71,7 +73,8 @@ test_expect_success 'Porcelain reset should remove remnants too' '
71
73
git ls-files -s &&
72
74
git reset --hard &&
73
75
git ls-files -s >actual &&
74
- ! test -f old
76
+ ! test -f old &&
77
+ test_cmp expect actual
75
78
'
76
79
77
80
test_expect_success ' Porcelain checkout -f should remove remnants too' '
@@ -86,7 +89,8 @@ test_expect_success 'Porcelain checkout -f should remove remnants too' '
86
89
git ls-files -s &&
87
90
git checkout -f &&
88
91
git ls-files -s >actual &&
89
- ! test -f old
92
+ ! test -f old &&
93
+ test_cmp expect actual
90
94
'
91
95
92
96
test_expect_success ' Porcelain checkout -f HEAD should remove remnants too' '
@@ -101,7 +105,8 @@ test_expect_success 'Porcelain checkout -f HEAD should remove remnants too' '
101
105
git ls-files -s &&
102
106
git checkout -f HEAD &&
103
107
git ls-files -s >actual &&
104
- ! test -f old
108
+ ! test -f old &&
109
+ test_cmp expect actual
105
110
'
106
111
107
112
test_done
Original file line number Diff line number Diff line change 603
603
fatal: Not a valid object name $(test_oid deadbeef_short)
604
604
EOF
605
605
test_must_fail git cat-file $arg1 $arg2 $(test_oid deadbeef_short) >out 2>err.actual &&
606
- test_must_be_empty out
606
+ test_must_be_empty out &&
607
+ test_cmp expect.err err.actual
607
608
'
608
609
609
610
test_expect_success " cat-file $arg1 $arg2 error on missing full OID" '
Original file line number Diff line number Diff line change @@ -60,11 +60,13 @@ test_expect_success 'allow missing object with --missing' '
60
60
'
61
61
62
62
test_expect_success ' mktree refuses to read ls-tree -r output (1)' '
63
- test_must_fail git mktree <all >actual
63
+ test_must_fail git mktree <all >actual &&
64
+ test_must_be_empty actual
64
65
'
65
66
66
67
test_expect_success ' mktree refuses to read ls-tree -r output (2)' '
67
- test_must_fail git mktree <all.withsub >actual
68
+ test_must_fail git mktree <all.withsub >actual &&
69
+ test_must_be_empty actual
68
70
'
69
71
70
72
test_done
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ test_expect_success 'gitdir selection on normal repos' '
37
37
38
38
test_expect_success ' gitdir selection on unsupported repo' '
39
39
# Make sure it would stop at test2, not trash
40
- test_expect_code 1 git -C test2 config core.repositoryformatversion >actual
40
+ test_expect_code 1 git -C test2 config core.repositoryformatversion
41
41
'
42
42
43
43
test_expect_success ' gitdir not required mode' '
Original file line number Diff line number Diff line change @@ -1568,6 +1568,7 @@ test_expect_success 'transaction can create and delete' '
1568
1568
EOF
1569
1569
git update-ref --stdin <stdin >actual &&
1570
1570
printf "%s: ok\n" start commit start commit >expect &&
1571
+ test_cmp expect actual &&
1571
1572
test_must_fail git show-ref --verify refs/heads/create-and-delete
1572
1573
'
1573
1574
@@ -1595,6 +1596,8 @@ test_expect_success 'transaction cannot restart ongoing transaction' '
1595
1596
commit
1596
1597
EOF
1597
1598
test_must_fail git update-ref --stdin <stdin >actual &&
1599
+ printf "%s: ok\n" start >expect &&
1600
+ test_cmp expect actual &&
1598
1601
test_must_fail git show-ref --verify refs/heads/restart
1599
1602
'
1600
1603
Original file line number Diff line number Diff line change @@ -551,7 +551,6 @@ test_expect_success REFFILES 'no bogus intermediate values during delete' '
551
551
git update-ref $prefix/foo $C &&
552
552
git pack-refs --all &&
553
553
git update-ref $prefix/foo $D &&
554
- git for-each-ref $prefix >unchanged &&
555
554
# Now try to update the reference, but hold the `packed-refs` lock
556
555
# for a while to see what happens while the process is blocked:
557
556
: >.git/packed-refs.lock &&
Original file line number Diff line number Diff line change @@ -258,15 +258,17 @@ test_expect_success '@{reflog}-parsing does not look beyond colon' '
258
258
git add @{yesterday} &&
259
259
git commit -m "funny reflog file" &&
260
260
git hash-object @{yesterday} >expect &&
261
- git rev-parse HEAD:@{yesterday} >actual
261
+ git rev-parse HEAD:@{yesterday} >actual &&
262
+ test_cmp expect actual
262
263
'
263
264
264
265
test_expect_success ' @{upstream}-parsing does not look beyond colon' '
265
266
echo content >@{upstream} &&
266
267
git add @{upstream} &&
267
268
git commit -m "funny upstream file" &&
268
269
git hash-object @{upstream} >expect &&
269
- git rev-parse HEAD:@{upstream} >actual
270
+ git rev-parse HEAD:@{upstream} >actual &&
271
+ test_cmp expect actual
270
272
'
271
273
272
274
test_done
You can’t perform that action at this time.
0 commit comments