From b3123f8d11f68dbd27def9a87f60d56215995e38 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 25 Aug 2019 14:05:05 -0700 Subject: [PATCH] =?UTF-8?q?Fix=20tests=20for=20=E2=80=98oni-elisp=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oni-elisp/oni-elisp.el | 3 ++- test/oni-elisp-test.el | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/oni-elisp/oni-elisp.el b/oni-elisp/oni-elisp.el index 1ae19d3..864c6c3 100644 --- a/oni-elisp/oni-elisp.el +++ b/oni-elisp/oni-elisp.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 20190825132536 +;; Version: 20190825135738 ;; Package-Requires: (oni-company oni-flycheck oni-paredit oni-fci oni-yasnippet rainbow-delimiters nameless erefactor) ;; This program is free software; you can redistribute it and/or modify @@ -43,6 +43,7 @@ (expand-file-name "snippets" oni-elisp-root) "The directory where ‘oni-elisp’ stores its snippets.") +;;;###autoload (defun oni-elisp-snippets-initialize () "Initialize the snippets for ‘oni-elisp’." (when (boundp 'yas-snippet-dirs) diff --git a/test/oni-elisp-test.el b/test/oni-elisp-test.el index c1984aa..38e6be3 100644 --- a/test/oni-elisp-test.el +++ b/test/oni-elisp-test.el @@ -26,8 +26,9 @@ (ert-deftest oni-elisp-test-autoloads () "Test that ‘oni-elisp’ gets loaded automatically." - (should (not (featurep 'oni-elisp))) - (require 'elisp-mode) + ;; Since ‘emacs-lisp-mode’ is pre-loaded into Emacs, I can only check if it’s + ;; also been properly loaded. There is never a state where ‘emacs-lisp-mode’ + ;; is not loaded in Emacs. (should (featurep 'oni-elisp))) (provide 'oni-elisp-test)