Thread (135 messages) 135 messages, 9 authors, 2020-03-17

Re: [PATCH 06/15] t3432: make these tests work with either am or merge backends

From: Elijah Newren <hidden>
Date: 2019-12-23 17:17:34

On Sat, Dec 21, 2019 at 9:11 PM Denton Liu [off-list ref] wrote:
Hi Elijah,

On Fri, Dec 20, 2019 at 05:09:39PM +0000, Elijah Newren via GitGitGadget wrote:
quoted
diff --git a/t/t3432-rebase-fast-forward.sh b/t/t3432-rebase-fast-forward.sh
index 92f95b57da..3879a43fa0 100755
--- a/t/t3432-rebase-fast-forward.sh
+++ b/t/t3432-rebase-fast-forward.sh
@@ -44,19 +44,16 @@ test_rebase_same_head_ () {
      test_expect_$status "git rebase$flag $* with $changes is $what with $cmp HEAD" "
              oldhead=\$(git rev-parse HEAD) &&
              test_when_finished 'git reset --hard \$oldhead' &&
+             cp .git/logs/HEAD expect &&
              git rebase$flag $* >stdout &&
              if test $what = work
              then
-                     # Must check this case first, for 'is up to
-                     # date, rebase forced[...]rewinding head' cases
-                     test_i18ngrep 'rewinding head' stdout
+                     wc -l .git/logs/HEAD >old &&
+                     wc -l .git/logs/HEAD >new &&
Are the above two lines some yet-to-be cleaned up leftovers? I can't see
where `old` and `new` are being used elsewhere.
Um, this whole section is broken and causes it to pass the test for
stupid reasons.  Not sure how I bungled that so badly.  I'll send a
re-roll with a corrected 6/15.
quoted
+                     test_line_count '-gt' $(($old + 2)) .git/logs/HEAD
              elif test $what = noop
              then
-                     test_i18ngrep 'is up to date' stdout &&
-                     test_i18ngrep ! 'rebase forced' stdout
-             elif test $what = noop-force
-             then
-                     test_i18ngrep 'is up to date, rebase forced' stdout
+                     test_cmp expect .git/logs/HEAD
              fi &&
              newhead=\$(git rev-parse HEAD) &&
              if test $cmp = same
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help