[Top][All Lists]

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

Re: [Orgmode] Re: Testing --- again...

From: Eric Schulte
Subject: Re: [Orgmode] Re: Testing --- again...
Date: Sat, 02 Oct 2010 15:55:12 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

"Eric Schulte" <address@hidden> writes:

> Could we just load every test in tests/lisp by default, and then use the
> existing `ert' selection method to select and run tests.  For example if
> we enforce our conventions on the level of test function name rather
> than on file name, we could (I believe) do something like the following.
> Say every test for a particular function (say org-export) includes that
> name of that function in the test name (say test-org-export), then we
> could use something simple like the following to run the tests for the
> current function (i.e. function around the point)
> (defun org-test-current-function ()
>   "Test the current function."
>   (ert (format "%S" (which-function))))
> This way we could maintain a much simpler directory structure inside of
> tests/ (or testing/) in which we don't need a separate file name for
> every function, but rather maybe one test file per elisp file
> (e.g. test-ob.el for ob.el), and possibly other files for tests
> organized around concepts that span multiple files (e.g. test-blocks.el
> or somesuch).

To illustrate my suggestions, I've thrown together a couple simple Babel
tests roughly following this outline, currently up in the
`schulte-testing' branch of the Org-mode repo.

To try it out
1) load the testing/org-test.el file
2) run `org-load-tests' to load up the entire org-mode test suite
3) run `ert' to run the test suite.
4) or jump to the definition of `org-babel-get-src-block-info' and run
   `org-test-current-function' to just run the tests for that function

Best -- Eric

reply via email to

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