diff options
| -rw-r--r-- | tests/test-prog-go--format-wiring.el | 6 | ||||
| -rw-r--r-- | tests/test-prog-python--format-wiring.el | 6 | ||||
| -rw-r--r-- | tests/test-prog-shell--format-wiring.el | 9 | ||||
| -rw-r--r-- | tests/test-prog-webdev--format-wiring.el | 10 |
4 files changed, 27 insertions, 4 deletions
diff --git a/tests/test-prog-go--format-wiring.el b/tests/test-prog-go--format-wiring.el index 99d80772..609aea34 100644 --- a/tests/test-prog-go--format-wiring.el +++ b/tests/test-prog-go--format-wiring.el @@ -20,9 +20,13 @@ (require 'testutil-format-wiring) (format-test--ensure-packages-init) -(ignore-errors (require 'prog-go)) +(require 'prog-go) (require 'go-mode) +(ert-deftest test-prog-go-format-package-loaded () + "Normal: `go-mode' is in `features' after the prog-go config loads." + (should (featurep 'go-mode))) + (ert-deftest test-prog-go-format-command-fboundp () "Normal: `gofmt' is fboundp after `go-mode' loads." (should (fboundp 'gofmt))) diff --git a/tests/test-prog-python--format-wiring.el b/tests/test-prog-python--format-wiring.el index 67c18dd1..b017b26b 100644 --- a/tests/test-prog-python--format-wiring.el +++ b/tests/test-prog-python--format-wiring.el @@ -18,10 +18,14 @@ ;; use-package's `:bind (:map ...)' defers until the named map exists. ;; Loading python.el populates `python-ts-mode-map'; loading blacken ;; resolves the binding form's late-binding hook. -(ignore-errors (require 'prog-python)) +(require 'prog-python) (require 'python) (require 'blacken) +(ert-deftest test-prog-python-format-package-loaded () + "Normal: `blacken' is in `features' after the prog-python config loads." + (should (featurep 'blacken))) + (ert-deftest test-prog-python-format-command-fboundp () "Normal: `blacken-buffer' is fboundp after the package is loaded." (should (fboundp 'blacken-buffer))) diff --git a/tests/test-prog-shell--format-wiring.el b/tests/test-prog-shell--format-wiring.el index 4a014943..604a1f26 100644 --- a/tests/test-prog-shell--format-wiring.el +++ b/tests/test-prog-shell--format-wiring.el @@ -25,10 +25,17 @@ ;; the map into existence by referencing the mode definition. When ;; tree-sitter isn't built in, bash-ts-mode is still defined as a ;; symbol via define-derived-mode, and its keymap exists. -(ignore-errors (require 'prog-shell)) +(require 'prog-shell) (when (executable-find "shfmt") (require 'shfmt)) +(ert-deftest test-prog-shell-format-package-loaded () + "Normal: `shfmt' is in `features' when the executable is on PATH. +Skipped when shfmt isn't installed because the use-package gates on +`:if (executable-find shfmt-path)' and never loads the package." + (format-test--skip-unless-executable "shfmt") + (should (featurep 'shfmt))) + (ert-deftest test-prog-shell-format-command-fboundp () "Normal: `shfmt-buffer' is fboundp after shfmt loads. Skipped when shfmt isn't installed because the use-package gates on diff --git a/tests/test-prog-webdev--format-wiring.el b/tests/test-prog-webdev--format-wiring.el index 7d9914f2..43cfe945 100644 --- a/tests/test-prog-webdev--format-wiring.el +++ b/tests/test-prog-webdev--format-wiring.el @@ -22,7 +22,15 @@ (require 'testutil-format-wiring) (format-test--ensure-packages-init) -(ignore-errors (require 'prog-webdev)) +(require 'prog-webdev) + +(ert-deftest test-prog-webdev-format-package-loaded () + "Normal: `prog-webdev' is in `features' after load. +The webdev formatter is a custom function defined in prog-webdev +itself, so this asserts the module loaded rather than a separate +formatter package (there isn't one — `cj/webdev-format-buffer' +shells out to the `prettier' CLI directly)." + (should (featurep 'prog-webdev))) (ert-deftest test-prog-webdev-format-command-fboundp () "Normal: `cj/webdev-format-buffer' is fboundp from prog-webdev." |
