From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106748 invoked by alias); 9 May 2017 04:02:41 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 106607 invoked by uid 89); 9 May 2017 04:02:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=zap X-HELO: gw02.mail.saunalahti.fi Received: from gw02.mail.saunalahti.fi (HELO gw02.mail.saunalahti.fi) (195.197.172.116) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 May 2017 04:02:31 +0000 Received: from deimos.wickedbsd.net (a91-153-249-219.elisa-laajakaista.fi [91.153.249.219]) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id B580B40032; Tue, 9 May 2017 07:02:29 +0300 (EEST) Received: from phobos.TeleWell.gateway.wickedbsd.net (10.0.0.6 [10.0.0.6]) by mail.wickedbsd.net (OpenSMTPD) with ESMTPSA id c0a1cb23 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 9 May 2017 07:02:28 +0300 (EEST) From: timo.myyra@wickedbsd.net (Timo =?utf-8?Q?Myyr=C3=A4?=) To: Per Bothner Cc: kawa@sourceware.org Subject: Re: [PATCH 1/2] Tweak xquery tests so that they pass on OpenBSD References: <8737cfl2qj.fsf@phobos.TeleWell.gateway> Date: Tue, 09 May 2017 04:02:00 -0000 In-Reply-To: (Per Bothner's message of "Mon, 8 May 2017 11:38:56 -0700") Message-ID: <87vapak79f.fsf@phobos.TeleWell.gateway> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2017-q2/txt/msg00056.txt.bz2 Per Bothner writes: > On 05/07/2017 09:11 PM, Timo Myyr=C3=A4 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.=20 > > 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 newlin= e. > 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. Hmm, I don't think kawa itself should emit newlines unless its told to.=20 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? Timo