Re: [PATCH v2 0/3] Add regression tests for rectent rebase -i fixes
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Jun 16, 2017, 18:43 UTC
- Message-ID
- <3c975634-8651-af74-66bf-ee793bc073fc@kdbg.org>
- In-Reply-To
- <alpine.DEB.2.21.1.1706161527140.4200@virtualbox>
Am 16.06.2017 um 15:49 schrieb Johannes Schindelin:
Show 22 quoted lines
> 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.
-- Hannes