From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tom Breton (Tehom)" Subject: Re: Proposal: Emtest as tester Date: Thu, 27 May 2010 16:13:28 -0400 Message-ID: References: <047c96c5361a8739fc4e8bb94abeef8e.squirrel@mail.panix.com> <736AEF85-4B24-41A0-8701-A2585CBDB4C7@gmail.com> <519bd899d41d1f97d0b7638ad2b702da.squirrel@mail.panix.com> <5F014FD2-5988-406F-9683-ACF2E3096231@gmail.com> <0bbc0d9ab1b84a87a1114077c5d72238.squirrel@mail.panix.com> <4BFB8DB3.5050807@os.inf.tu-dresden.de> Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=58606 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHjSM-0003S5-Nf for emacs-orgmode@gnu.org; Thu, 27 May 2010 16:13:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHjSL-0000FY-E6 for emacs-orgmode@gnu.org; Thu, 27 May 2010 16:13:30 -0400 Received: from mail1.panix.com ([166.84.1.72]:51708) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHjSL-0000FR-CD for emacs-orgmode@gnu.org; Thu, 27 May 2010 16:13:29 -0400 In-Reply-To: <4BFB8DB3.5050807@os.inf.tu-dresden.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Martin Pohlack Cc: emacs-orgmode@gnu.org, Tom Breton > Hi Tom, > >> > [...] > > I made an attempt earlier to propose a testing framework and wrote some > thoughts in an email thread: > > http://www.mail-archive.com/emacs-orgmode@gnu.org/msg22558.html I read that. Interesting. > Would your proposal cover my example-based approach? How hard would it > be to turn a typical bug report into a test case? Not hard at all. Most of what you propose is already supported. You would put both the input and expected output in FOO/examples/UNIQUE-NAMES The sequence of commands can easily be made into a test case.=20 `emt:insert' inserts the template for you (choose `emt:insert-test'), the= n paste it in. Rather than saving the buffer, you probably want to do it all inside a mock buffer, like (excuse the online-editor formatting) (emtb:with-buf (:file INPUT-FILE-NAME) (operations) (emtb:buf-contents-matches (:file OUTPUT-FILE-NAME)) For testing only visible output, you'd presumably use org-export-visible and compare that buffer's contents to what's expected. Wildcard comparisons in files are not yet supported. I will take that as a feature request. Tom Breton (Tehom)