On Wed, Oct 02, 2024 at 05:43:45PM -0400, Eric Sunshine wrote: > On Wed, Oct 2, 2024 at 11:17 AM Patrick Steinhardt <ps@xxxxxx> wrote: > > Two of our tests in t3404 use indented HERE docs where leading tabs on > > some of the lines are actually relevant. The tabs do get removed though, > > and we try to fix this up by using sed(1) to replace leading tabs in the > > actual output, as well. But on macOS 10.15 this doesn't work as expected > > and we somehow keep the tabs around in the actual output. > > I presume this nebulous explanation is due to the fact that the reason > why macOS 10.15 exhibits this anomalous behavior is not yet known? Yeah, I didn't thoroughly investigate this one but just wanted to have it fixed. I was hitting so many platform-dependent issues left and right that at some point I started to feel a bit tired. > > Work around this issue by retaining the tabs. > > > > Signed-off-by: Patrick Steinhardt <ps@xxxxxx> > > --- > > diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh > > @@ -1917,18 +1917,17 @@ test_expect_success '--update-refs updates refs correctly' ' > > - cat >expect <<-\EOF && > > - Successfully rebased and updated refs/heads/update-refs. > > - Updated the following refs with --update-refs: > > - refs/heads/first > > - refs/heads/no-conflict-branch > > - refs/heads/second > > - refs/heads/third > > - EOF > > + cat >expect <<\EOF && > > +Successfully rebased and updated refs/heads/update-refs. > > +Updated the following refs with --update-refs: > > + refs/heads/first > > + refs/heads/no-conflict-branch > > + refs/heads/second > > + refs/heads/third > > +EOF > > Although this works, the problem with this change (and its sibling > later in the patch) is that someday someone is going to come along > (say, for instance, a GSoC applicant doing a microproject) who submits > a patch to (re-)"modernize" this test by using `<<-` to (re-)indent > the heredoc body. A better approach would probably be to retain `<<-` > and use q_to_tab(): > > q_to_tab >expect <<-\EOF && > Qrefs/heads/first > Q... > Qrefs/heads/third > EOF Cute! Didn't know we even had this helper. Patrick