Skip to content

Commit

Permalink
tests: Fix byte-compilation test.
Browse files Browse the repository at this point in the history
* test/shx-test.el (shx-test-unit-byte-compile): Simply assert on the
return value of byte-compile-file, which is non-nil when there are no
errors.

Fixes: <riscy#33>
  • Loading branch information
Apteryks committed Jan 19, 2024
1 parent b99d16f commit 6e8cb6f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/shx-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ Example:
"Test byte-compilation against the shx.el file."
(ignore-errors (kill-buffer "*Compile-Log*"))
(let ((file (replace-regexp-in-string ".elc$" ".el" (symbol-file 'shx-mode))))
(byte-compile-file file)
(shx-test-assert "shx.el passes byte-compilation"
(with-current-buffer (get-buffer-create "*Compile-Log*")
(<= (- (point-max) (point)) 3)))))
(byte-compile-file file))))

(defun shx-test-unit-declare-function ()
"Test `declare-function'."
Expand Down

0 comments on commit 6e8cb6f

Please sign in to comment.