"Eric Schulte" <schulte.e...@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 _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode