Enable all tests on Travis

This commit is contained in:
John Wiegley 2017-12-05 15:47:41 -08:00
parent 0c110ebd67
commit 2a9904b9e8

View file

@ -26,8 +26,6 @@
(require 'ert) (require 'ert)
(require 'use-package) (require 'use-package)
(defvar running-on-travis t)
(setq use-package-always-ensure nil (setq use-package-always-ensure nil
use-package-verbose 'errors use-package-verbose 'errors
use-package-expand-minimally t use-package-expand-minimally t
@ -824,11 +822,30 @@
(autoload #'bar "foo" nil t)) (autoload #'bar "foo" nil t))
(bar)))) (bar))))
(unless running-on-travis (ert-deftest use-package-test/:commands-5 ()
(ert-deftest use-package-test/:commands-5 () (match-expansion
(use-package gnus-harvest
:load-path "foo"
:commands gnus-harvest-install
:demand t
:config
(if (featurep 'message-x)
(gnus-harvest-install 'message-x)
(gnus-harvest-install)))
`(progn
(eval-and-compile
(add-to-list 'load-path ,(pred stringp)))
(require 'gnus-harvest nil nil)
(if (featurep 'message-x)
(gnus-harvest-install 'message-x)
(gnus-harvest-install))
t)))
(ert-deftest use-package-test/:commands-6 ()
(let ((byte-compile-current-file t))
(match-expansion (match-expansion
(use-package gnus-harvest (use-package gnus-harvest
:load-path "lisp/gnus-harvest" :load-path "foo"
:commands gnus-harvest-install :commands gnus-harvest-install
:demand t :demand t
:config :config
@ -837,39 +854,19 @@
(gnus-harvest-install))) (gnus-harvest-install)))
`(progn `(progn
(eval-and-compile (eval-and-compile
(add-to-list 'load-path "/Users/johnw/.emacs.d/lisp/gnus-harvest")) (add-to-list 'load-path ,(pred stringp)))
(eval-and-compile
(eval-when-compile
(with-demoted-errors "Cannot load gnus-harvest: %S" nil
(load "gnus-harvest" nil t))))
(eval-when-compile
(declare-function gnus-harvest-install "gnus-harvest"))
(require 'gnus-harvest nil nil) (require 'gnus-harvest nil nil)
(if (featurep 'message-x) (if
(featurep 'message-x)
(gnus-harvest-install 'message-x) (gnus-harvest-install 'message-x)
(gnus-harvest-install)) (gnus-harvest-install))
t))) t))))
(ert-deftest use-package-test/:commands-6 ()
(let ((byte-compile-current-file t))
(match-expansion
(use-package gnus-harvest
:load-path "lisp/gnus-harvest"
:commands gnus-harvest-install
:demand t
:config
(if (featurep 'message-x)
(gnus-harvest-install 'message-x)
(gnus-harvest-install)))
`(progn
(eval-and-compile
(add-to-list 'load-path "/Users/johnw/.emacs.d/lisp/gnus-harvest"))
(eval-and-compile
(eval-when-compile
(with-demoted-errors "Cannot load gnus-harvest: %S" nil
(load "gnus-harvest" nil t))))
(eval-when-compile
(declare-function gnus-harvest-install "gnus-harvest"))
(require 'gnus-harvest nil nil)
(if
(featurep 'message-x)
(gnus-harvest-install 'message-x)
(gnus-harvest-install))
t)))))
(ert-deftest use-package-test/:defines-1 () (ert-deftest use-package-test/:defines-1 ()
(match-expansion (match-expansion
@ -1339,40 +1336,39 @@
(eval-after-load 'bar (eval-after-load 'bar
'(require 'foo nil nil)))))) '(require 'foo nil nil))))))
(unless running-on-travis (ert-deftest use-package-test/:demand-7 ()
(ert-deftest use-package-test/:demand-7 () (match-expansion
(match-expansion (use-package counsel
(use-package counsel :load-path "foo"
:load-path "site-lisp/swiper" :after ivy
:after ivy :demand t
:demand t :diminish
:diminish :bind (("C-*" . counsel-org-agenda-headlines)
:bind (("C-*" . counsel-org-agenda-headlines) ("M-x" . counsel-M-x))
("M-x" . counsel-M-x)) :commands (counsel-minibuffer-history
:commands (counsel-minibuffer-history counsel-find-library
counsel-find-library counsel-unicode-char)
counsel-unicode-char) :preface (preface-code)
:preface (preface-code) :init
:init ;; This is actually wrong, but it's just part of the example.
;; This is actually wrong, but it's just part of the example. (define-key minibuffer-local-map (kbd "M-r")
(define-key minibuffer-local-map (kbd "M-r") 'counsel-minibuffer-history))
'counsel-minibuffer-history)) `(progn
`(progn (eval-and-compile
(eval-and-compile (add-to-list 'load-path ,(pred stringp)))
(add-to-list 'load-path "/Users/johnw/.emacs.d/site-lisp/swiper")) (eval-and-compile
(eval-and-compile (preface-code))
(preface-code)) (eval-after-load 'ivy
(eval-after-load 'ivy '(progn
'(progn (define-key minibuffer-local-map (kbd "M-r")
(define-key minibuffer-local-map (kbd "M-r") 'counsel-minibuffer-history)
'counsel-minibuffer-history) (require 'counsel nil nil)
(require 'counsel nil nil) (if (fboundp 'diminish)
(if (fboundp 'diminish) (diminish 'counsel-mode))
(diminish 'counsel-mode)) (ignore
(ignore (bind-keys :package counsel
(bind-keys :package counsel ("C-*" . counsel-org-agenda-headlines)
("C-*" . counsel-org-agenda-headlines) ("M-x" . counsel-M-x))))))))
("M-x" . counsel-M-x)))))))))
(ert-deftest use-package-test/:config-1 () (ert-deftest use-package-test/:config-1 ()
(match-expansion (match-expansion
@ -1667,26 +1663,25 @@
("C-c C-r" . org-ref-helm-insert-cite-link)) ("C-c C-r" . org-ref-helm-insert-cite-link))
`(bind-key "C-c C-r" #'org-ref-helm-insert-cite-link override-global-map nil))) `(bind-key "C-c C-r" #'org-ref-helm-insert-cite-link override-global-map nil)))
(unless running-on-travis (ert-deftest use-package-test/560 ()
(ert-deftest use-package-test/560 () (flet ((executable-find (name)))
(flet ((executable-find (name))) (let (notmuch-command)
(let (notmuch-command) (match-expansion
(match-expansion (use-package notmuch
(use-package notmuch :preface (setq-default notmuch-command (executable-find "notmuch"))
:preface (setq-default notmuch-command (executable-find "notmuch")) :if notmuch-command
:if notmuch-command :requires foo
:requires foo :load-path "foo"
:load-path "my-load-path" :defines var)
:defines var) `(progn
`(progn (eval-and-compile
(add-to-list 'load-path ,(pred stringp)))
(when (featurep 'foo)
(eval-and-compile (eval-and-compile
(add-to-list 'load-path "/Users/johnw/.emacs.d/my-load-path")) (setq-default notmuch-command
(when (featurep 'foo) (executable-find "notmuch")))
(eval-and-compile (when (symbol-value 'notmuch-command)
(setq-default notmuch-command (require 'notmuch nil nil))))))))
(executable-find "notmuch")))
(when (symbol-value 'notmuch-command)
(require 'notmuch nil nil)))))))))
(ert-deftest bind-key/:prefix-map () (ert-deftest bind-key/:prefix-map ()
(match-expansion (match-expansion