From: Johannes Sixt Date: Mon, 19 Jun 2017 19:45:39 GMT Subject: Re: [PATCH v2 0/3] Add regression tests for rectent rebase -i fixes Message-ID: <8be59224-5bb7-50e6-4381-29c250fb10ec@kdbg.org> In-Reply-To: <3c975634-8651-af74-66bf-ee793bc073fc@kdbg.org> Am 16.06.2017 um 20:43 schrieb Johannes Sixt: > Am 16.06.2017 um 15:49 schrieb Johannes Schindelin: >> On Thu, 15 Jun 2017, Junio C Hamano wrote: >>> diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh >>> index 325ec75353..801bce25da 100755 >>> --- a/t/t3420-rebase-autostash.sh >>> +++ b/t/t3420-rebase-autostash.sh >>> @@ -45,7 +45,7 @@ create_expected_success_am() { >>> } >>> create_expected_success_interactive() { >>> - cr=$'\r' && >>> + cr=$(echo . | tr '.' '\015') && >>> cat >expected <<-EOF >>> $(grep "^Created autostash: [0-9a-f][0-9a-f]*\$" actual) >>> HEAD is now at $(git rev-parse --short feature-branch) third >>> commit >> >> This is still incorrect, as the \r\n (which $(echo . | tr \.\ '\015') >> would emit) is interpreted correctly as a line break on Windows, meaning >> that cr is now *empty*. Not what we want. >> >> What I did is to replace the `cat` by `q_to_cr` (we have that lovely >> function, might just as well use it), replace `${cr}` by `Q` and skip the >> cr variable altogether. > > You beat me to it. I came up with the identical q_to_cr changes, but > haven't dug the remaining failure regarding the swapped output lines. > You seem to have nailed it. Will test your proposed changes tomorrow. As expected, the patches fix the observed test failures for me, too, if that's still relevant. -- Hannes