This is the mail archive of the
mailing list for the Kawa project.
Re: [PATCH 1/2] Tweak xquery tests so that they pass on OpenBSD
- From: timo dot myyra at wickedbsd dot net (Timo Myyrä)
- To: Per Bothner <per at bothner dot com>
- Cc: kawa at sourceware dot org
- Date: Tue, 09 May 2017 07:02:04 +0300
- Subject: Re: [PATCH 1/2] Tweak xquery tests so that they pass on OpenBSD
- Authentication-results: sourceware.org; auth=none
- References: <8737cfl2qj.fsf@phobos.TeleWell.gateway> <firstname.lastname@example.org>
Per Bothner <email@example.com> writes:
> On 05/07/2017 09:11 PM, Timo Myyrä wrote:
>> OpenBSD's diff doesn't have -B flag so work around it by formatting the
>> expected test outputs to not have newline in the end.
> I'm not comfortable changing checked-in text files so they don't end
> in a newline, like text files should.
> Ideally the output should always (or at least by default) end in a newline.
> Perhaps close should automatically call freshLine. However, you have to
> be careful with binary files - and it becomes non-obvious with hybrid
> text/binary files, which Kawa supports.
> So not sure what to do. It needs some thought.
> As a work-round until then, I suggest we add a newline to the end of the output.
> For example:
> echo >>tmp-format-users.html
> Or perhaps we can have sed add the newline.
I don't think kawa itself should emit newlines unless its told to.
As the sed command already strips whitespace besides newlines, could it be just
expanded to zap newlines as well. Or pipe to `tr -d '\n'`.
With XML the formatting doesn't matter so it would probably be easiest to
compare expected output if its formatted as single long string?