Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id q79LJQYX015435 for ; Thu, 9 Aug 2012 23:19:27 +0200 Received: (qmail 2169 invoked by alias); 9 Aug 2012 21:19:21 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 09 Aug 2012 21:19:21 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx071) with SMTP; 09 Aug 2012 23:19:21 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id q79LHNvd032494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 9 Aug 2012 23:17:24 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.1) with ESMTP id q79FaeON008220; Thu, 9 Aug 2012 23:17:24 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 2654061 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 9 Aug 2012 23:17:24 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.1) with ESMTP id q79LHOe6004700 for ; Thu, 9 Aug 2012 23:17:24 +0200 Received: from smtp.demon.co.uk (mdfmta010.mxout.tbr.inty.net [91.221.168.51]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id q79LH38w032393 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 9 Aug 2012 23:17:07 +0200 Received: from mdfmta010.tbr.inty.net (unknown [127.0.0.1]) by mdfmta010.tbr.inty.net (Postfix) with ESMTP id 1B2486F80DD for ; Thu, 9 Aug 2012 22:17:03 +0100 (BST) Received: from mdfmta010.tbr.inty.net (unknown [127.0.0.1]) by mdfmta010.tbr.inty.net (Postfix) with ESMTP id 019406F80D7 for ; Thu, 9 Aug 2012 22:17:03 +0100 (BST) Received: from palladium.local (unknown [80.176.134.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mdfmta010.tbr.inty.net (Postfix) with ESMTP for ; Thu, 9 Aug 2012 22:17:02 +0100 (BST) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 References: <5022BFB4.1090800@latex-project.org> X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-MDF-HostID: 3 Message-ID: <502428CD.1050208@morningstar2.co.uk> Date: Thu, 9 Aug 2012 22:17:01 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: Examples of l3doc & unit testing? To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Sender is in whitelist: joseph.wright@MORNINGSTAR2.CO.UK); Detail=5D7Q89H36p4L00VTXC6D4q0N+AH0PUCnBi0P5cROEGjO+pG7NAH/K+tf9SrVFtpLrKONl 2T9EL4W4U4jgzLbnCcGpk1z/zwmKT/K1fv3lD0=V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 7114 On 09/08/2012 18:30, Bruno Le Floch wrote: > We run our test suite using a Makefile (or make.bat on Windows), which > - calls the appropriate TeX engine the appropriate number of times, then > - calls a Perl script to remove paths and other parts of the log file > specific to a given installation, > - calls diff to compare the result with a saved result. > The drawbacks are that it is os-dependent, it uses perl, which may not > be installed everywhere. > > It should be possible to use a texlua script in place of the Makefile, > either LPeg on the Lua side or l3regex on the TeX side to strip the > log file, then comparing again either on the Lua or TeX side. Would > it be useful? Is copying the current test system the right approach? I have certainly wondered about replacing the Perl script with a Lua one, but I am not 100% that makes things more accessible (if you look beyond people with a 'recent' TeX distro, Perl is likely to be more, not less, 'available' than Lua). It would certainly be handy to remove the need to use the system file comparison tool at the end of the process, as "diff" and "fc" give rather different output. It would also be good to have everything available in one 'package'. The current LaTeX3 test system works pretty well, provided the tests are written to actually test behaviour correctly :-) Checking log file info seems to work well both for 'programmatic' information (writing the result to the log), and for 'typesetting' (by using \box_show:N to again write to the log). So it does not seem like a bad model. It might be worth looking at the TeX part of the process (the test .tex file) to see if it needs any tidying up to be more generally usable. Of course, if you do want to look at this then it would also be worth looking at the alternatives (e.g. qstest). -- Joseph Wright