Skip to content

Commit b954692

Browse files
committed
Merge branch 'pw/rebase-progress-test-cleanup'
Test cleanup. * pw/rebase-progress-test-cleanup: t3420: remove progress lines before comparing output
2 parents 8a4acc5 + bb431c3 commit b954692

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

t/t3420-rebase-autostash.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ test_expect_success setup '
3030
echo conflicting-change >file2 &&
3131
git add . &&
3232
test_tick &&
33-
git commit -m "related commit"
33+
git commit -m "related commit" &&
34+
remove_progress_re="$(printf "s/.*\\r//")"
3435
'
3536

3637
create_expected_success_am () {
@@ -48,8 +49,8 @@ create_expected_success_interactive () {
4849
q_to_cr >expected <<-EOF
4950
$(grep "^Created autostash: [0-9a-f][0-9a-f]*\$" actual)
5051
HEAD is now at $(git rev-parse --short feature-branch) third commit
51-
Rebasing (1/2)QRebasing (2/2)QApplied autostash.
52-
Q QSuccessfully rebased and updated refs/heads/rebased-feature-branch.
52+
Applied autostash.
53+
Successfully rebased and updated refs/heads/rebased-feature-branch.
5354
EOF
5455
}
5556

@@ -67,13 +68,13 @@ create_expected_failure_am () {
6768
}
6869

6970
create_expected_failure_interactive () {
70-
q_to_cr >expected <<-EOF
71+
cat >expected <<-EOF
7172
$(grep "^Created autostash: [0-9a-f][0-9a-f]*\$" actual)
7273
HEAD is now at $(git rev-parse --short feature-branch) third commit
73-
Rebasing (1/2)QRebasing (2/2)QApplying autostash resulted in conflicts.
74+
Applying autostash resulted in conflicts.
7475
Your changes are safe in the stash.
7576
You can run "git stash pop" or "git stash drop" at any time.
76-
Q QSuccessfully rebased and updated refs/heads/rebased-feature-branch.
77+
Successfully rebased and updated refs/heads/rebased-feature-branch.
7778
EOF
7879
}
7980

@@ -109,7 +110,8 @@ testrebase () {
109110
suffix=interactive
110111
fi &&
111112
create_expected_success_$suffix &&
112-
test_i18ncmp expected actual
113+
sed "$remove_progress_re" <actual >actual2 &&
114+
test_i18ncmp expected actual2
113115
'
114116

115117
test_expect_success "rebase$type: dirty index, non-conflicting rebase" '
@@ -209,7 +211,8 @@ testrebase () {
209211
suffix=interactive
210212
fi &&
211213
create_expected_failure_$suffix &&
212-
test_i18ncmp expected actual
214+
sed "$remove_progress_re" <actual >actual2 &&
215+
test_i18ncmp expected actual2
213216
'
214217
}
215218

0 commit comments

Comments
 (0)