From: Eric Schulte <schulte.eric@gmail.com>
To: Martyn Jago <martyn.jago@btinternet.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch][test] Remove jump.el dependency from test execution
Date: Mon, 12 Sep 2011 10:37:44 -0600 [thread overview]
Message-ID: <87ty8hbtt3.fsf@gmail.com> (raw)
In-Reply-To: <m2zki94uhr.fsf@btinternet.com> (Martyn Jago's message of "Mon, 12 Sep 2011 17:04:48 +0100")
Applied. Thanks! -- Eric
Martyn Jago <martyn.jago@btinternet.com> writes:
> Currently it is required to install the git submodule jump.el and
> dependencies to run tests, and yet these test helpers are not required
> in test execution.
>
> This patch removes this dependency, whilst loading the test helpers when
> they exist (git submodule init && git submodule update).
>
> The idea is to document the test helper availability to aid development
> in the test documentation I am about to generate.
>
> Best, Martyn
>
> From b3111a4ea6b2e5b134634c7eebf27a210529df58 Mon Sep 17 00:00:00 2001
> From: Martyn Jago <martyn.jago@btinternet.com>
> Date: Mon, 12 Sep 2011 16:50:28 +0100
> Subject: [PATCH] Remove jump.el dependency from test execution
> * testing/org-test.el:
> Remove jump.el dependency from test execution removing the need for a
> user to install git submodules
>
> ---
> testing/org-test.el | 23 ++++++++++++++---------
> 1 files changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/testing/org-test.el b/testing/org-test.el
> index a8b5b49..136a287 100644
> --- a/testing/org-test.el
> +++ b/testing/org-test.el
> @@ -16,11 +16,13 @@
> ;; called while in a `defun' all ert tests with names matching the
> ;; name of the function are run.
>
> -;;; Prerequisites:
> -
> -;; ERT and jump.el are both included as git submodules, install with
> -;; $ git submodule init
> -;; $ git submodule update
> +;;; Test Development
> +;; For test development purposes a number of navigation and test
> +;; function construction routines are available as a git submodule
> +;; (jump.el)
> +;; Install with...
> +;; $ git submodule init
> +;; $ git submodule update
>
> \f
> ;;;; Code:
> @@ -38,13 +40,15 @@
> (cons
> (expand-file-name "jump" org-test-dir)
> load-path))))
> + (require 'cl)
> (require 'ert)
> (require 'ert-x)
> - (require 'jump)
> - (require 'which-func)
> + (when (file-exists-p
> + (expand-file-name "jump/jump.el" org-test-dir))
> + (require 'jump)
> + (require 'which-func))
> (require 'org)))
>
> -
> (defconst org-test-default-test-file-name "tests.el"
> "For each defun a separate file with tests may be defined.
> tests.el is the fallback or default if you like.")
> @@ -136,6 +140,7 @@ files."
>
> \f
> ;;; Navigation Functions
> +(when (featurep 'jump)
> (defjump org-test-jump
> (("lisp/\\1.el" . "testing/lisp/test-\\1.el")
> ("lisp/\\1.el" . "testing/lisp/\\1.el/test.*.el")
> @@ -178,7 +183,7 @@ files."
> " (should-error (error \"errr...\")))\n\n\n"
> "(provide '" name ")\n\n"
> ";;; " file-name " ends here\n") full-path))
> - (lambda () ((lambda (res) (if (listp res) (car res) res)) (which-function))))
> + (lambda () ((lambda (res) (if (listp res) (car res) res)) (which-function)))))
>
> (define-key emacs-lisp-mode-map "\M-\C-j" 'org-test-jump)
--
Eric Schulte
http://cs.unm.edu/~eschulte/
prev parent reply other threads:[~2011-09-12 16:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-12 16:04 [patch][test] Remove jump.el dependency from test execution Martyn Jago
2011-09-12 16:37 ` Eric Schulte [this message]
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=87ty8hbtt3.fsf@gmail.com \
--to=schulte.eric@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=martyn.jago@btinternet.com \
/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).