emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Proposal: Emtest as tester


From: Tom Breton (Tehom)
Subject: Re: [Orgmode] Proposal: Emtest as tester
Date: Thu, 27 May 2010 16:13:28 -0400
User-agent: SquirrelMail/1.4.19

> 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/address@hidden/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. 
`emt:insert' inserts the template for you (choose `emt:insert-test'), then
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)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]