From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: Testing --- again... Date: Sat, 02 Oct 2010 15:55:12 -0600 Message-ID: <87sk0ofef3.fsf@gmail.com> References: <87vd5li75s.fsf@gmx.de> <0CDCC1C3-3D93-465E-827C-A722978F4D13@gmail.com> <87fwwoihuy.fsf@gmail.com> <87fwwobd9k.fsf@gmx.de> <871v88ibhh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=60746 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2A35-00021y-4K for emacs-orgmode@gnu.org; Sat, 02 Oct 2010 17:55:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2A33-0007xA-NY for emacs-orgmode@gnu.org; Sat, 02 Oct 2010 17:55:18 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:48457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2A33-0007x4-Gx for emacs-orgmode@gnu.org; Sat, 02 Oct 2010 17:55:17 -0400 Received: by pxi5 with SMTP id 5so2529058pxi.0 for ; Sat, 02 Oct 2010 14:55:16 -0700 (PDT) In-Reply-To: <871v88ibhh.fsf@gmail.com> (Eric Schulte's message of "Sat, 02 Oct 2010 14:30:18 -0600") 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: Sebastian Rose Cc: Emacs-orgmode mailing list , Carsten Dominik "Eric Schulte" 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