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 q79HWskQ022126 for ; Thu, 9 Aug 2012 19:32:55 +0200 Received: (qmail 11745 invoked by alias); 9 Aug 2012 17:32:49 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 09 Aug 2012 17:32:49 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx078) with SMTP; 09 Aug 2012 19:32:49 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id q79HULnj014479 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 9 Aug 2012 19:30:22 +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 q79FaeJJ008220; Thu, 9 Aug 2012 19:30:22 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 2653806 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 9 Aug 2012 19:30:22 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.1) with ESMTP id q79HULSK027327 for ; Thu, 9 Aug 2012 19:30:21 +0200 Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id q79HUGcQ014453 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 9 Aug 2012 19:30:20 +0200 Received: by vcbfl13 with SMTP id fl13so885389vcb.22 for ; Thu, 09 Aug 2012 10:30:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.98.101 with SMTP id eh5mr99173vdb.8.1344533416392; Thu, 09 Aug 2012 10:30:16 -0700 (PDT) Received: by 10.220.143.84 with HTTP; Thu, 9 Aug 2012 10:30:16 -0700 (PDT) References: <5022BFB4.1090800@latex-project.org> Content-Type: text/plain; charset=windows-1252 X-Spam-Whitelist: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id q79HUMSK027328 Message-ID: Date: Thu, 9 Aug 2012 19:30:16 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch 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 (BackTrace mail analyze); Detail=5D7Q89H36p4L00VTXC6D4q0N+AH0PUCnGL2vqOgpaBYL16oitsMrgDt/NQNpSCZFFjDOy 97xb7Zpf+wZnd5ZXNcvLDXR3Wg3wRjdQbwEMh8=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: 7113 On 8/8/12, Joel C. Salomon wrote: > On Wed, Aug 8, 2012 at 3:36 PM, Frank Mittelbach > wrote: >> Am 08.08.2012 19:34, schrieb Joel C. Salomon: >> >>> Is there a simple example somewhere of the use of l3doc’s \TestFiles, >>> \UnitTested, & \TestMissing commands? What sort of unit-tests are >>> these meant to document? >>> >>> (Or are these just meant to be dumb pointers to arbitrary kinds of >>> unit testing?) >> >> they are meant to document how much testing has been written in the >> regression test suite. The idea being that each interface function gets >> tested on standard and boundary cases (in the ./testfiles directories). >> >> but nothing scientific about really. It always depended on how well >> people >> wrote and write tests. Now at some point we did some attempt to sort out >> where we have tests and where we are still missing them. >> >> There is some support in the make file for this "make checktest" >> >> but we didn't quite got this properly going (yet) > > And on Wed, Aug 8, 2012 at 3:54 PM, Joseph Wright > wrote: >> Frank has covered what the idea is here. To see the tests themselves, >> take a look at the GitHub site: the tests don't go to CTAN. > > Thank you both. I'll have to see whether & how to adapt that model to > my own programming style. > > And since there's nothing l3-specific going on, I can get tips on > writing effective unit tests elsewhere (read: on TeX.SX) without > distracting this list. ;-) > > (There shouldn't be any funny interactions between l3doc and qstest, > right?) I've been thinking of writing an xtest (or l3test) for some time now, to cater for my own package's need for testing. 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? Regards, Bruno