From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martyn Jago Subject: [patch][test] Remove jump.el dependency from test execution Date: Mon, 12 Sep 2011 17:04:48 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R390V-0003Oc-Pz for emacs-orgmode@gnu.org; Mon, 12 Sep 2011 12:05:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R390T-0005ms-H8 for emacs-orgmode@gnu.org; Mon, 12 Sep 2011 12:05:15 -0400 Received: from lo.gmane.org ([80.91.229.12]:41636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R390T-0005fp-7J for emacs-orgmode@gnu.org; Mon, 12 Sep 2011 12:05:13 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R390H-0006Rf-RI for emacs-orgmode@gnu.org; Mon, 12 Sep 2011 18:05:01 +0200 Received: from 88-96-171-142.dsl.zen.co.uk ([88.96.171.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Sep 2011 18:05:01 +0200 Received: from martyn.jago by 88-96-171-142.dsl.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Sep 2011 18:05:01 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Remove-jump.el-dependency-from-test-execution.patch Content-Description: Remove jump.el dependency from test execution >From b3111a4ea6b2e5b134634c7eebf27a210529df58 Mon Sep 17 00:00:00 2001 From: Martyn Jago 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 ;;;; 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." ;;; 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) -- 1.7.3.4 --=-=-= Content-Type: text/plain --- Org-mode version 7.7 (release_7.7.278.gb3111.dirty) GNU Emacs 24.0.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.35) of 2011-08-21 on virtualmac.porkrind.org --=-=-=--