From: "Eric Schulte" <schulte.eric@gmail.com>
To: Sebastian Rose <sebastian_rose@gmx.de>
Cc: Emacs-orgmode mailing list <emacs-orgmode@gnu.org>,
Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: Re: Testing --- again...
Date: Sat, 02 Oct 2010 15:55:12 -0600 [thread overview]
Message-ID: <87sk0ofef3.fsf@gmail.com> (raw)
In-Reply-To: <871v88ibhh.fsf@gmail.com> (Eric Schulte's message of "Sat, 02 Oct 2010 14:30:18 -0600")
"Eric Schulte" <schulte.eric@gmail.com> 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
next prev parent reply other threads:[~2010-10-02 21:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-02 3:51 Testing --- again Sebastian Rose
2010-10-02 8:09 ` Carsten Dominik
2010-10-02 14:53 ` Sebastian Rose
2010-10-02 15:01 ` Sebastian Rose
2010-10-02 17:05 ` Carsten Dominik
2010-10-02 18:12 ` Eric Schulte
2010-10-02 19:33 ` Sebastian Rose
2010-10-02 20:30 ` Eric Schulte
2010-10-02 21:55 ` Eric Schulte [this message]
2010-10-03 0:46 ` Sebastian Rose
2010-10-04 1:26 ` Eric Schulte
2010-10-04 3:59 ` Sebastian Rose
2010-10-04 15:26 ` Eric Schulte
2010-10-05 0:21 ` Sebastian Rose
2010-10-05 18:57 ` Eric Schulte
2010-10-06 0:48 ` Bernt Hansen
2010-10-06 2:57 ` Eric Schulte
2010-10-02 22:14 ` Sebastian Rose
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sk0ofef3.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=sebastian_rose@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).