aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2018-03-12 23:03:20 +0000
committerWilfred Hughes <me@wilfred.me.uk>2018-03-12 23:03:20 +0000
commit563c511704cb0a05af859ce1fcd2809c9392e48b (patch)
tree68e628270520c75752b524149684cf904cd18528
parent9474fdaf4c5ccc89fea9337314c0cb563a4cb469 (diff)
Split helpful--definition test into two distinct tests
-rw-r--r--test/unit-test.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/unit-test.el b/test/unit-test.el
index 985e0e3..8043ff1 100644
--- 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