From a4cfd3343a83b5b8cd2dfe5ac83b8f9a02b837a7 Mon Sep 17 00:00:00 2001 From: Erik Hetzner Date: Mon, 8 Feb 2016 21:40:11 -0800 Subject: [PATCH] org-attach: Prevent test fails on systems without git-annex * testing/lisp/test-org-attach-annex.el: Move all org-attach tests that use git-annex to this file, which can test for the presence of git-annex. Prevents tests failing on systems where git-annex is not installed. --- .../lisp/{test-org-attach.el => test-org-attach-annex.el} | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename testing/lisp/{test-org-attach.el => test-org-attach-annex.el} (95%) diff --git a/testing/lisp/test-org-attach.el b/testing/lisp/test-org-attach-annex.el similarity index 95% rename from testing/lisp/test-org-attach.el rename to testing/lisp/test-org-attach-annex.el index 9772bd785..44b4ad053 100644 --- a/testing/lisp/test-org-attach.el +++ b/testing/lisp/test-org-attach-annex.el @@ -1,4 +1,4 @@ -;;; test-org-attach.el --- Tests for Org Attach +;;; test-org-annex-attach.el --- Tests for Org Attach with git-annex ;; ;; Copyright (c) 2016 Erik Hetzner ;; Authors: Erik Hetzner @@ -19,6 +19,7 @@ ;; along with this program. If not, see . ;;; Code: +(org-test-for-executable "git-annex") (require 'org-attach) (require 'cl-lib) @@ -32,7 +33,6 @@ ,@body)))) (ert-deftest test-org-attach/use-annex () - (org-test-for-executable "git-annex") (test-org-attach-annex/with-annex (let ((org-attach-git-annex-cutoff 1)) (should (org-attach-use-annex))) @@ -50,7 +50,6 @@ (delete-directory tmpdir 'recursive)))) (ert-deftest test-org-attach/get-maybe () - (org-test-for-executable "git-annex") (test-org-attach-annex/with-annex (let ((path (expand-file-name "test-file")) (annex-dup (make-temp-file "org-annex-test" t))) @@ -94,4 +93,4 @@ (should (string-equal "hello world\n" (buffer-string)))) (should (eq called 'was-called))))))) -;;; test-org-attach.el ends here +;;; test-org-attach-annex.el ends here