On 26/01/16 08:54, Johannes Schindelin wrote:
> Hi Ramsay,
[snip]
>>
>> But you are only testing 3/4 conflict markers end in CR/LF. :-D
>
> The fact that ||| markers are present is the fault of previous test cases.
> I tried to make a point of *not* relying on such a side effect (so as to
> debug failures quicker by commenting out all previous test cases).
>
> So the fact that I am testing only 3 of the 4 conflict markers is very
> much by design.
I'm sorry, but I don't understand what you are trying to say here. :(
>
>>> Read: I am uncertain that I want to spend the additional lines on
>>> testing more than actually necessary.
>>
>> If the here doc is too verbose for you, how about something like this
>> (totally untested):
>>
>> test $(tr "\015" Q <crlf.txt | grep "^[<=>|].*Q$" | wc -l) -eq 4
>>
>> instead?
>
> Hmm. I do not see the benefit over grepping for `txtQ$` it's essentially
> the same.
Well, as I said 'totally untested', but it _should_ be different. ;-)
The output from the 'tr "\015" Q <crlf.txt' subcommand should look
something like:
1Q
2Q
<<<<<<< crlf-diff1.txtQ
4Q
||||||| crlf-orig.txtQ
3Q
=======Q
5Q
>>>>>>> crlf-diff2.txtQ
so that your 'grep "\\.txtQ$"' should select these lines:
<<<<<<< crlf-diff1.txtQ
||||||| crlf-orig.txtQ
>>>>>>> crlf-diff2.txtQ
whereas my 'grep "^[<=>|].*Q$"' should select these lines:
<<<<<<< crlf-diff1.txtQ
||||||| crlf-orig.txtQ
=======Q
>>>>>>> crlf-diff2.txtQ
(ie. select all 4 conflict markers).
>
>> HTH
>
> How the hell?
:-D Hope That Helps.
>
>> ATB,
>> Ramsay Jones
>
> Authorization to Buy?
All The Best.
ATB,
Ramsay Jones
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html