瀏覽代碼

less hacky check for executables when loading tests

* testing/org-test.el (org-test-for-executable): Less hacky check for
  executables when loading tests.
Eric Schulte 13 年之前
父節點
當前提交
832fd8b415
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      testing/org-test.el

+ 4 - 1
testing/org-test.el

@@ -107,7 +107,10 @@ org-test searches this directory up the directory tree.")
 This can be used at the top of code-block-language specific test
 files to avoid loading the file on systems without the
 executable."
-  (unless (> (length (shell-command-to-string (format "which %s" exe))) 0)
+  (unless (reduce
+	   (lambda (acc dir)
+	     (or acc (file-exists-p (expand-file-name exe dir))))
+	   exec-path :initial-value nil)
     (throw 'missing-test-dependency exe)))
 
 (defun org-test-buffer (&optional file)