diff options
| author | Cayetano Santos <csantosb@inventati.org> | 2026-04-17 16:52:21 +0200 |
|---|---|---|
| committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2026-04-26 07:53:08 +0200 |
| commit | 78e603ce225abcaaaeffac2f3840988ed2bbcb7c (patch) | |
| tree | 350da6e55f7de7785e94ce0d677d500634143942 /gnu | |
| parent | 83dfde3eb6f76f29b734dad322fc7bedd9f8ce60 (diff) | |
gnu: emacs-mastodon: Add tests.
* gnu/packages/emacs-xyz.scm (emacs-mastodon)[native-inputs]: Add
emacs-el-mock.
[arguments]<#:test-command>: Add.
<#:tests?>: Delete.
<#:phases>: Indent; add ’skip-failing-tests and ’fix-tests.
Change-Id: Id7f9c07a9d54c7f91dfc498aa4859ddd56c17a40
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/emacs-xyz.scm | 70 |
1 files changed, 59 insertions, 11 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 2d5af76838..8eb651832c 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -41541,17 +41541,65 @@ time.") (build-system emacs-build-system) (arguments (list - #:tests? #f ; requires cask - #:phases #~(modify-phases %standard-phases - ;; Move the source files to the top level, which is - ;; included in the EMACSLOADPATH. - (add-after 'unpack 'move-source-files - (lambda _ - (let ((el-files (find-files "./lisp" ".*\\.el$"))) - (for-each (lambda (f) - (rename-file f - (basename f))) - el-files))))))) + #:test-command #~(list "make" "tests") + #:phases + #~(modify-phases %standard-phases + ;; Move the source files to the top level, which is + ;; included in the EMACSLOADPATH. + (add-after 'unpack 'move-source-files + (lambda _ + (let ((el-files (find-files "./lisp" ".*\\.el$"))) + (for-each (lambda (f) + (rename-file f + (basename f))) + el-files)))) + (add-before 'check 'fix-tests + (lambda _ + (substitute* "Makefile" + (("cask") "")) + (substitute* "test/ert-helper.el" + (("lisp\\/") "")))) + (add-before 'check 'skip-failing-tests + (lambda _ + (let-syntax + ((disable-tests + (syntax-rules () + ((_ file ()) + (syntax-error "test names list must not be empty")) + ((_ file (test-name ...)) + (substitute* file + (((string-append + "^\\(ert-deftest " test-name ".*") all) + (string-append all "(skip-unless nil)\n")) ...))))) + (disable-tests + "test/mastodon-profile-tests.el" + ("mastodon-profile--add-author-bylines" + "mastodon-profile--make-author-buffer")) + (disable-tests + "test/mastodon-auth-tests.el" + ("mastodon-auth--handle-token-response--good" + "mastodon-auth-plstore-token-check")) + (disable-tests + "test/mastodon-client-tests.el" + ("mastodon-client--make-user-active" + "mastodon-client--store" + "mastodon-client--store-access-token")) + (disable-tests + "test/mastodon-tl-tests.el" + ("mastodon-tl--byline-timestamp-has-relative-display" + "mastodon-tl--next-tab-item--no-spaces-at-ends" + "mastodon-tl--next-tab-item--with-spaces-at-ends")) + (disable-tests + "test/mastodon-media-tests.el" + ("mastodon-media--get-avatar-rendering" + "mastodon-media--inline-images" + "mastodon-media--load-image-from-url-avatar-with-imagemagic" + "mastodon-media--load-image-from-url-avatar-without-imagemagic" + "mastodon-media--load-image-from-url-media-link-with-imagemagic" + "mastodon-media--load-image-from-url-media-link-without-imagemagic" + "mastodon-media--load-image-from-url-url-fetching-fails" + "mastodon-media--process-image-response")))))))) + (native-inputs (list emacs-el-mock)) (propagated-inputs (list emacs-persist emacs-tp)) (home-page "https://codeberg.org/martianh/mastodon.el") |
