From 03a20c4fc17fcf5a5c729783844e88dbafbb01a0 Mon Sep 17 00:00:00 2001 From: Sachin Patil Date: Sat, 16 Apr 2016 13:35:31 +0530 Subject: [PATCH] Should fix #1 Signed-off-by: Sachin Patil --- ReadMe.org | 9 +++++++++ ert-tests/emacsd-test.el | 33 +++++++++++++++++++++++++++++++++ package_init.el | 8 ++++++++ 3 files changed, 50 insertions(+) create mode 100644 ert-tests/emacsd-test.el diff --git a/ReadMe.org b/ReadMe.org index d89a1a2..1e541eb 100644 --- a/ReadMe.org +++ b/ReadMe.org @@ -14,7 +14,16 @@ #+END_SRC - Edit =;; Personal info= section in file =general_config.el= + - Optionally, run =make= to byte-compile config files. - Start Emacs +** Contribute + - Feel free to send PRs + - Create new issues + - Make sure to run tests before sending a PR + #+BEGIN_SRC shell + make test + #+END_SRC + ** Gnus - Optionally you can edit parameter in =gnus.el= and copy the file as =~/.gnus.el= diff --git a/ert-tests/emacsd-test.el b/ert-tests/emacsd-test.el new file mode 100644 index 0000000..3b25e23 --- /dev/null +++ b/ert-tests/emacsd-test.el @@ -0,0 +1,33 @@ +;;; emacsd-test.el --- Tests for .emacs.d + +;; Dumb tests to check if config files exists +(ert-deftest emacsd-init-file-exists-test () + "Check if init.el exists" + (should (equal (file-exists-p "../init.el") t))) + +(ert-deftest emacsd-general_config-file-exists-test () + "Check if general_config.el exists" + (should (equal (file-exists-p "../general_config.el") t))) + +(ert-deftest emacsd-install-file-exists-test () + "Check if install.el exists" + (should (equal (file-exists-p "../install.el") t))) + +(ert-deftest emacsd-defalias-file-exists-test () + "Check if defalias.el exists" + (should (equal (file-exists-p "../defalias.el") t))) + +(ert-deftest emacsd-kbd_macro-file-exists-test () + "Check if kbd_macro.el exists" + (should (equal (file-exists-p "../kbd_macro.el") t))) + +(ert-deftest emacsd-package_init-file-exists-test () + "Check if kbd_package_init.el exists" + (should (equal (file-exists-p "../package_init.el") t))) + +;; Optional +(ert-deftest emacsd-gnus-file-exists-test () + "Check if gnus.el exists" + (should (equal (file-exists-p "../gnus.el") t))) + +;; TODO: Test(s) for extensions/hidepw diff --git a/package_init.el b/package_init.el index d5f6e06..2b8e6e5 100644 --- a/package_init.el +++ b/package_init.el @@ -1,5 +1,13 @@ ;; load package init +;; To avoid make error +;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Declaring-Functions.html +(declare-function global-company-mode "company.el") +(declare-function global-auto-complete-mode "auto-complete.el") +(declare-function autopair-global-mode "autopair.el") +(declare-function ac-ispell-setup "ac-ispell.el") +(declare-function yas-global-mode "yasnippet.el") + (global-company-mode t) (global-auto-complete-mode t) (autopair-global-mode t)