diff options
| author | Andreas Politz <politza@hochschule-trier.de> | 2018-10-20 17:42:10 +0200 |
|---|---|---|
| committer | Andreas Politz <politza@hochschule-trier.de> | 2018-10-20 17:42:10 +0200 |
| commit | 14de101171d7bfdb0f741c6878f2f048d1f6ee88 (patch) | |
| tree | f21fbebff70c8fede80d5294cf84409a106dc6ac /test | |
| parent | 17169f3761fdc1f520708c84ef35cc750be9d5bd (diff) | |
Add tests for pdf-loader.el
Diffstat (limited to 'test')
| -rw-r--r-- | test/pdf-loader-test.el | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/pdf-loader-test.el b/test/pdf-loader-test.el new file mode 100644 index 0000000..a7bc79f --- /dev/null +++ b/test/pdf-loader-test.el @@ -0,0 +1,24 @@ +;; -*- lexical-binding: t -*- + +(require 'pdf-loader) +(require 'ert) +(require 'cl-lib) + +(ert-deftest pdf-loader-activation () + :expected-result :failed ;; Until someone figures out how to run the + ;; tests w/o loading all of the package. + (should-not (memq 'pdf-tools features)) + (pdf-loader-install) + (with-current-buffer (find-file "test.pdf") + (should (eq major-mode 'pdf-view-mode)))) + +(ert-deftest pdf-loader-install/uninstall-alists () + (cl-labels ((alists-installed-p () + (and (assoc pdf-loader--auto-mode-alist-item + auto-mode-alist) + (assoc pdf-loader--magic-mode-alist-item + magic-mode-alist)))) + (pdf-loader--install #'ignore) + (should (alists-installed-p)) + (pdf-loader--uninstall) + (should-not (alists-installed-p)))) |
