aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJohn Wiegley2017-12-07 22:40:48 -0800
committerJohn Wiegley2017-12-07 22:40:48 -0800
commit0068501aa086efc1b01620ec5bd427ef57cb9f9d (patch)
tree4332b8fa169e029b352a3baf2b091549b47f9673 /test
parentae0d24368189025379a249ee31b3999c25645934 (diff)
downloademacs-0068501aa086efc1b01620ec5bd427ef57cb9f9d.tar.gz
emacs-0068501aa086efc1b01620ec5bd427ef57cb9f9d.zip
Remove several unnecessary calls to `ignore'
Diffstat (limited to 'test')
-rw-r--r--test/lisp/use-package/use-package-tests.el152
1 files changed, 60 insertions, 92 deletions
diff --git a/test/lisp/use-package/use-package-tests.el b/test/lisp/use-package/use-package-tests.el
index 0b40fb582ad..5ba6db8a4b5 100644
--- a/test/lisp/use-package/use-package-tests.el
+++ b/test/lisp/use-package/use-package-tests.el
@@ -594,10 +594,9 @@
594 (unless 594 (unless
595 (fboundp 'key2) 595 (fboundp 'key2)
596 (autoload #'key2 "foo" nil t)) 596 (autoload #'key2 "foo" nil t))
597 (ignore 597 (bind-keys :package foo
598 (bind-keys :package foo 598 ("C-k" . key1)
599 ("C-k" . key1) 599 ("C-u" . key2)))))
600 ("C-u" . key2))))))
601 600
602(ert-deftest use-package-test/:bind-2 () 601(ert-deftest use-package-test/:bind-2 ()
603 (match-expansion 602 (match-expansion
@@ -607,10 +606,9 @@
607 (autoload #'key1 "foo" nil t)) 606 (autoload #'key1 "foo" nil t))
608 (unless (fboundp 'key2) 607 (unless (fboundp 'key2)
609 (autoload #'key2 "foo" nil t)) 608 (autoload #'key2 "foo" nil t))
610 (ignore 609 (bind-keys :package foo
611 (bind-keys :package foo 610 ("C-k" . key1)
612 ("C-k" . key1) 611 ("C-u" . key2)))))
613 ("C-u" . key2))))))
614 612
615(ert-deftest use-package-test/:bind-3 () 613(ert-deftest use-package-test/:bind-3 ()
616 (match-expansion 614 (match-expansion
@@ -622,17 +620,15 @@
622 (unless 620 (unless
623 (fboundp 'key2) 621 (fboundp 'key2)
624 (autoload #'key2 "foo" nil t)) 622 (autoload #'key2 "foo" nil t))
625 (ignore 623 (bind-keys :package foo :map my-map
626 (bind-keys :package foo :map my-map 624 ("C-k" . key1)
627 ("C-k" . key1) 625 ("C-u" . key2)))))
628 ("C-u" . key2))))))
629 626
630(ert-deftest use-package-test/:bind-4 () 627(ert-deftest use-package-test/:bind-4 ()
631 (should-error 628 (should-error
632 (match-expansion 629 (match-expansion
633 (use-package foo :bind :map my-map ("C-k" . key1) ("C-u" . key2)) 630 (use-package foo :bind :map my-map ("C-k" . key1) ("C-u" . key2))
634 `(ignore 631 `(bind-keys :package foo))))
635 (bind-keys :package foo)))))
636 632
637(ert-deftest use-package-test/:bind-5 () 633(ert-deftest use-package-test/:bind-5 ()
638 (match-expansion 634 (match-expansion
@@ -642,11 +638,10 @@
642 (autoload #'key1 "foo" nil t)) 638 (autoload #'key1 "foo" nil t))
643 (unless (fboundp 'key2) 639 (unless (fboundp 'key2)
644 (autoload #'key2 "foo" nil t)) 640 (autoload #'key2 "foo" nil t))
645 (ignore 641 (bind-keys :package foo
646 (bind-keys :package foo 642 ("C-k" . key1)
647 ("C-k" . key1) 643 :map my-map
648 :map my-map 644 ("C-u" . key2)))))
649 ("C-u" . key2))))))
650 645
651(ert-deftest use-package-test/:bind-6 () 646(ert-deftest use-package-test/:bind-6 ()
652 (match-expansion 647 (match-expansion
@@ -662,11 +657,10 @@
662 (autoload #'key2 "foo" nil t)) 657 (autoload #'key2 "foo" nil t))
663 (unless (fboundp 'key3) 658 (unless (fboundp 'key3)
664 (autoload #'key3 "foo" nil t)) 659 (autoload #'key3 "foo" nil t))
665 (ignore 660 (bind-keys :package foo
666 (bind-keys :package foo 661 ("C-k" . key1)
667 ("C-k" . key1) 662 :map my-map ("C-u" . key2)
668 :map my-map ("C-u" . key2) 663 :map my-map2 ("C-u" . key3)))))
669 :map my-map2 ("C-u" . key3))))))
670 664
671(ert-deftest use-package-test/:bind-7 () 665(ert-deftest use-package-test/:bind-7 ()
672 (match-expansion 666 (match-expansion
@@ -677,8 +671,7 @@
677 (use-package-ensure-elpa 'foo '(t) 'nil) 671 (use-package-ensure-elpa 'foo '(t) 'nil)
678 (unless (fboundp 'browse-at-remote) 672 (unless (fboundp 'browse-at-remote)
679 (autoload #'browse-at-remote "foo" nil t)) 673 (autoload #'browse-at-remote "foo" nil t))
680 (ignore 674 (bind-keys :package foo ("C-c r" . browse-at-remote)))))
681 (bind-keys :package foo ("C-c r" . browse-at-remote))))))
682 675
683(ert-deftest use-package-test/:bind-8 () 676(ert-deftest use-package-test/:bind-8 ()
684 (match-expansion 677 (match-expansion
@@ -693,10 +686,9 @@
693 (autoload #'foo "foo" nil t)) 686 (autoload #'foo "foo" nil t))
694 (unless (fboundp 'bar) 687 (unless (fboundp 'bar)
695 (autoload #'bar "foo" nil t)) 688 (autoload #'bar "foo" nil t))
696 (ignore 689 (bind-keys :package foo :map foo-map
697 (bind-keys :package foo :map foo-map 690 ("C-c r" . foo)
698 ("C-c r" . foo) 691 ("C-c r" . bar)))))
699 ("C-c r" . bar))))))
700 692
701(ert-deftest use-package-test/:bind*-1 () 693(ert-deftest use-package-test/:bind*-1 ()
702 (match-expansion 694 (match-expansion
@@ -704,26 +696,23 @@
704 `(progn 696 `(progn
705 (unless (fboundp 'key) 697 (unless (fboundp 'key)
706 (autoload #'key "foo" nil t)) 698 (autoload #'key "foo" nil t))
707 (ignore 699 (bind-keys* :package foo ("C-k" . key)))))
708 (bind-keys* :package foo ("C-k" . key))))))
709 700
710(ert-deftest use-package-test/:bind-keymap-1 () 701(ert-deftest use-package-test/:bind-keymap-1 ()
711 (match-expansion 702 (match-expansion
712 (use-package foo :bind-keymap ("C-k" . key)) 703 (use-package foo :bind-keymap ("C-k" . key))
713 `(ignore 704 `(bind-key "C-k"
714 (bind-key "C-k" 705 #'(lambda nil
715 #'(lambda nil 706 (interactive)
716 (interactive) 707 (use-package-autoload-keymap 'key 'foo nil)))))
717 (use-package-autoload-keymap 'key 'foo nil))))))
718 708
719(ert-deftest use-package-test/:bind-keymap*-1 () 709(ert-deftest use-package-test/:bind-keymap*-1 ()
720 (match-expansion 710 (match-expansion
721 (use-package foo :bind-keymap* ("C-k" . key)) 711 (use-package foo :bind-keymap* ("C-k" . key))
722 `(ignore 712 `(bind-key* "C-k"
723 (bind-key* "C-k" 713 #'(lambda ()
724 #'(lambda () 714 (interactive)
725 (interactive) 715 (use-package-autoload-keymap 'key 'foo t)))))
726 (use-package-autoload-keymap 'key 'foo t))))))
727 716
728(ert-deftest use-package-test/:interpreter-1 () 717(ert-deftest use-package-test/:interpreter-1 ()
729 (match-expansion 718 (match-expansion
@@ -731,8 +720,7 @@
731 `(progn 720 `(progn
732 (unless (fboundp 'foo) 721 (unless (fboundp 'foo)
733 (autoload #'foo "foo" nil t)) 722 (autoload #'foo "foo" nil t))
734 (ignore 723 (add-to-list 'interpreter-mode-alist '("interp" . foo)))))
735 (add-to-list 'interpreter-mode-alist '("interp" . foo))))))
736 724
737(ert-deftest use-package-test/:interpreter-2 () 725(ert-deftest use-package-test/:interpreter-2 ()
738 (match-expansion 726 (match-expansion
@@ -740,8 +728,7 @@
740 `(progn 728 `(progn
741 (unless (fboundp 'fun) 729 (unless (fboundp 'fun)
742 (autoload #'fun "foo" nil t)) 730 (autoload #'fun "foo" nil t))
743 (ignore 731 (add-to-list 'interpreter-mode-alist '("interp" . fun)))))
744 (add-to-list 'interpreter-mode-alist '("interp" . fun))))))
745 732
746(ert-deftest use-package-test-normalize/:mode () 733(ert-deftest use-package-test-normalize/:mode ()
747 (flet ((norm (&rest args) 734 (flet ((norm (&rest args)
@@ -764,8 +751,7 @@
764 `(progn 751 `(progn
765 (unless (fboundp 'foo) 752 (unless (fboundp 'foo)
766 (autoload #'foo "foo" nil t)) 753 (autoload #'foo "foo" nil t))
767 (ignore 754 (add-to-list 'auto-mode-alist '("interp" . foo)))))
768 (add-to-list 'auto-mode-alist '("interp" . foo))))))
769 755
770(ert-deftest use-package-test/:mode-2 () 756(ert-deftest use-package-test/:mode-2 ()
771 (match-expansion 757 (match-expansion
@@ -773,8 +759,7 @@
773 `(progn 759 `(progn
774 (unless (fboundp 'fun) 760 (unless (fboundp 'fun)
775 (autoload #'fun "foo" nil t)) 761 (autoload #'fun "foo" nil t))
776 (ignore 762 (add-to-list 'auto-mode-alist '("interp" . fun)))))
777 (add-to-list 'auto-mode-alist '("interp" . fun))))))
778 763
779(ert-deftest use-package-test/:magic-1 () 764(ert-deftest use-package-test/:magic-1 ()
780 (match-expansion 765 (match-expansion
@@ -782,8 +767,7 @@
782 `(progn 767 `(progn
783 (unless (fboundp 'foo) 768 (unless (fboundp 'foo)
784 (autoload #'foo "foo" nil t)) 769 (autoload #'foo "foo" nil t))
785 (ignore 770 (add-to-list 'magic-mode-alist '("interp" . foo)))))
786 (add-to-list 'magic-mode-alist '("interp" . foo))))))
787 771
788(ert-deftest use-package-test/:magic-2 () 772(ert-deftest use-package-test/:magic-2 ()
789 (match-expansion 773 (match-expansion
@@ -791,8 +775,7 @@
791 `(progn 775 `(progn
792 (unless (fboundp 'fun) 776 (unless (fboundp 'fun)
793 (autoload #'fun "foo" nil t)) 777 (autoload #'fun "foo" nil t))
794 (ignore 778 (add-to-list 'magic-mode-alist '("interp" . fun)))))
795 (add-to-list 'magic-mode-alist '("interp" . fun))))))
796 779
797(ert-deftest use-package-test/:magic-fallback-1 () 780(ert-deftest use-package-test/:magic-fallback-1 ()
798 (match-expansion 781 (match-expansion
@@ -800,8 +783,7 @@
800 `(progn 783 `(progn
801 (unless (fboundp 'foo) 784 (unless (fboundp 'foo)
802 (autoload #'foo "foo" nil t)) 785 (autoload #'foo "foo" nil t))
803 (ignore 786 (add-to-list 'magic-fallback-mode-alist '("interp" . foo)))))
804 (add-to-list 'magic-fallback-mode-alist '("interp" . foo))))))
805 787
806(ert-deftest use-package-test/:magic-fallback-2 () 788(ert-deftest use-package-test/:magic-fallback-2 ()
807 (match-expansion 789 (match-expansion
@@ -809,8 +791,7 @@
809 `(progn 791 `(progn
810 (unless (fboundp 'fun) 792 (unless (fboundp 'fun)
811 (autoload #'fun "foo" nil t)) 793 (autoload #'fun "foo" nil t))
812 (ignore 794 (add-to-list 'magic-fallback-mode-alist '("interp" . fun)))))
813 (add-to-list 'magic-fallback-mode-alist '("interp" . fun))))))
814 795
815(ert-deftest use-package-test/:commands-1 () 796(ert-deftest use-package-test/:commands-1 ()
816 (match-expansion 797 (match-expansion
@@ -1039,10 +1020,8 @@
1039 (autoload #'fun "foo" nil t)) 1020 (autoload #'fun "foo" nil t))
1040 (eval-when-compile 1021 (eval-when-compile
1041 (declare-function fun "foo")) 1022 (declare-function fun "foo"))
1042 (ignore 1023 (add-hook 'hook-hook #'fun)
1043 (add-hook 'hook-hook #'fun)) 1024 (bind-keys :package foo ("C-a" . key))))))
1044 (ignore
1045 (bind-keys :package foo ("C-a" . key)))))))
1046 1025
1047(ert-deftest use-package-test/:hook-2 () 1026(ert-deftest use-package-test/:hook-2 ()
1048 (match-expansion 1027 (match-expansion
@@ -1051,8 +1030,7 @@
1051 `(progn 1030 `(progn
1052 (unless (fboundp 'fun) 1031 (unless (fboundp 'fun)
1053 (autoload #'fun "foo" nil t)) 1032 (autoload #'fun "foo" nil t))
1054 (ignore 1033 (add-hook 'hook-hook #'fun))))
1055 (add-hook 'hook-hook #'fun)))))
1056 1034
1057(ert-deftest use-package-test/:hook-3 () 1035(ert-deftest use-package-test/:hook-3 ()
1058 (let ((use-package-hook-name-suffix nil)) 1036 (let ((use-package-hook-name-suffix nil))
@@ -1062,8 +1040,7 @@
1062 `(progn 1040 `(progn
1063 (unless (fboundp 'fun) 1041 (unless (fboundp 'fun)
1064 (autoload #'fun "foo" nil t)) 1042 (autoload #'fun "foo" nil t))
1065 (ignore 1043 (add-hook 'hook #'fun)))))
1066 (add-hook 'hook #'fun))))))
1067 1044
1068(ert-deftest use-package-test/:hook-4 () 1045(ert-deftest use-package-test/:hook-4 ()
1069 (let ((use-package-hook-name-suffix "-special")) 1046 (let ((use-package-hook-name-suffix "-special"))
@@ -1073,8 +1050,7 @@
1073 `(progn 1050 `(progn
1074 (unless (fboundp 'fun) 1051 (unless (fboundp 'fun)
1075 (autoload #'fun "foo" nil t)) 1052 (autoload #'fun "foo" nil t))
1076 (ignore 1053 (add-hook 'hook-special #'fun)))))
1077 (add-hook 'hook-special #'fun))))))
1078 1054
1079(ert-deftest use-package-test/:hook-5 () 1055(ert-deftest use-package-test/:hook-5 ()
1080 (match-expansion 1056 (match-expansion
@@ -1091,11 +1067,10 @@
1091 (eval-after-load 'elisp-mode 1067 (eval-after-load 'elisp-mode
1092 '(progn 1068 '(progn
1093 (require 'erefactor nil nil) 1069 (require 'erefactor nil nil)
1094 (ignore 1070 (add-hook
1095 (add-hook 1071 'emacs-lisp-mode-hook
1096 'emacs-lisp-mode-hook 1072 #'(lambda nil
1097 #'(lambda nil 1073 (bind-key "" erefactor-map emacs-lisp-mode-map))))))))
1098 (bind-key "" erefactor-map emacs-lisp-mode-map)))))))))
1099 1074
1100(ert-deftest use-package-test/:hook-6 () 1075(ert-deftest use-package-test/:hook-6 ()
1101 (match-expansion 1076 (match-expansion
@@ -1110,8 +1085,7 @@
1110 '(progn 1085 '(progn
1111 (unless (fboundp 'function) 1086 (unless (fboundp 'function)
1112 (autoload #'function "erefactor" nil t)) 1087 (autoload #'function "erefactor" nil t))
1113 (ignore 1088 (add-hook 'emacs-lisp-mode-hook #'function))))))
1114 (add-hook 'emacs-lisp-mode-hook #'function)))))))
1115 1089
1116(ert-deftest use-package-test/:hook-7 () 1090(ert-deftest use-package-test/:hook-7 ()
1117 (match-expansion 1091 (match-expansion
@@ -1125,8 +1099,7 @@
1125 (eval-after-load 'elisp-mode 1099 (eval-after-load 'elisp-mode
1126 '(progn 1100 '(progn
1127 (require 'erefactor nil nil) 1101 (require 'erefactor nil nil)
1128 (ignore 1102 (add-hook 'emacs-lisp-mode-hook #'(lambda nil (function))))))))
1129 (add-hook 'emacs-lisp-mode-hook #'(lambda nil (function)))))))))
1130 1103
1131(ert-deftest use-package-test-normalize/:custom () 1104(ert-deftest use-package-test-normalize/:custom ()
1132 (flet ((norm (&rest args) 1105 (flet ((norm (&rest args)
@@ -1182,8 +1155,7 @@
1182 #'(lambda (keyword err) 1155 #'(lambda (keyword err)
1183 (let ((msg (format "%s/%s: %s" 'foo keyword 1156 (let ((msg (format "%s/%s: %s" 'foo keyword
1184 (error-message-string err)))) 1157 (error-message-string err))))
1185 (ignore 1158 (display-warning 'use-package msg :error))))
1186 (display-warning 'use-package msg :error)))))
1187 (condition-case-unless-debug err 1159 (condition-case-unless-debug err
1188 (require 'foo nil nil) 1160 (require 'foo nil nil)
1189 (error 1161 (error
@@ -1433,10 +1405,9 @@
1433 (require 'counsel nil nil) 1405 (require 'counsel nil nil)
1434 (if (fboundp 'diminish) 1406 (if (fboundp 'diminish)
1435 (diminish 'counsel-mode)) 1407 (diminish 'counsel-mode))
1436 (ignore 1408 (bind-keys :package counsel
1437 (bind-keys :package counsel 1409 ("C-*" . counsel-org-agenda-headlines)
1438 ("C-*" . counsel-org-agenda-headlines) 1410 ("M-x" . counsel-M-x)))))))
1439 ("M-x" . counsel-M-x))))))))
1440 1411
1441(ert-deftest use-package-test/:config-1 () 1412(ert-deftest use-package-test/:config-1 ()
1442 (match-expansion 1413 (match-expansion
@@ -1680,8 +1651,7 @@
1680 (autoload #'mu4e "mu4e" nil t)) 1651 (autoload #'mu4e "mu4e" nil t))
1681 (eval-after-load 'mu4e 1652 (eval-after-load 'mu4e
1682 '(progn (config) t)) 1653 '(progn (config) t))
1683 (ignore 1654 (bind-keys :package mu4e ("<f9>" . mu4e)))))
1684 (bind-keys :package mu4e ("<f9>" . mu4e))))))
1685 1655
1686(ert-deftest use-package-test/543 () 1656(ert-deftest use-package-test/543 ()
1687 (match-expansion 1657 (match-expansion
@@ -1719,11 +1689,10 @@
1719 (unless 1689 (unless
1720 (fboundp 'company-try-hard) 1690 (fboundp 'company-try-hard)
1721 (autoload #'company-try-hard "company-try-hard" nil t)) 1691 (autoload #'company-try-hard "company-try-hard" nil t))
1722 (ignore 1692 (bind-keys :package company-try-hard
1723 (bind-keys :package company-try-hard 1693 ("C-c M-/" . company-try-hard)
1724 ("C-c M-/" . company-try-hard) 1694 :map company-active-map
1725 :map company-active-map 1695 ("C-c M-/" . company-try-hard)))))
1726 ("C-c M-/" . company-try-hard))))))
1727 1696
1728(ert-deftest use-package-test/558 () 1697(ert-deftest use-package-test/558 ()
1729 (match-expansion 1698 (match-expansion
@@ -1798,8 +1767,7 @@
1798 '(progn 1767 '(progn
1799 (message "test. helm start") 1768 (message "test. helm start")
1800 t)) 1769 t))
1801 (ignore 1770 (bind-keys :package helm ("C-c d" . helm-mini)))))
1802 (bind-keys :package helm ("C-c d" . helm-mini))))))
1803 1771
1804(ert-deftest bind-key/:prefix-map () 1772(ert-deftest bind-key/:prefix-map ()
1805 (match-expansion 1773 (match-expansion