helpful

a fork of Wilfred's helpful
git clone https://git.trogloxene.org/helpful.git
Log | Files | Refs | README

commit 563c511704cb0a05af859ce1fcd2809c9392e48b
parent 9474fdaf4c5ccc89fea9337314c0cb563a4cb469
Author: Wilfred Hughes <me@wilfred.me.uk>
Date:   Mon, 12 Mar 2018 23:03:20 +0000

Split helpful--definition test into two distinct tests

Diffstat:
Mtest/unit-test.el | 16+++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/test/unit-test.el b/test/unit-test.el @@ -205,13 +205,8 @@ symbol (not a form)." (should (s-contains-p "run-python" formatted)))) -(setq helpful-var-without-defvar 'foo) - -(ert-deftest helpful--definition () - ;; Ensure we don't crash on calling `helpful--definition' on - ;; variables defined without `defvar'. - (helpful--definition 'helpful-var-without-defvar nil) - ;; Handle definitions of variables in C source code. +(ert-deftest helpful--definition-c-vars () + "Handle definitions of variables in C source code." (let* ((emacs-src-path (f-join default-directory "emacs-25.3" "src"))) (if (f-exists-p emacs-src-path) (let ((find-function-C-source-directory emacs-src-path)) @@ -219,6 +214,13 @@ symbol (not a form)." (message "No Emacs source code found at %S, skipping test. Run ./download_emacs_src.sh" emacs-src-path)))) +(setq helpful-var-without-defvar 'foo) + +(ert-deftest helpful--definition-no-defvar () + "Ensure we don't crash on calling `helpful--definition' on +variables defined without `defvar'." + (helpful--definition 'helpful-var-without-defvar nil)) + (ert-deftest helpful--definition-edebug-fn () "Ensure we use the position information set by edebug, if present." ;; Test with both edebug enabled and disabled. The edebug property