[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51037: [PATCH] Make `print-level` & `print-length` customizable in E

From: Lars Ingebrigtsen
Subject: bug#51037: [PATCH] Make `print-level` & `print-length` customizable in ERT batch tests
Date: Wed, 06 Oct 2021 11:30:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Michael <sp1ff@runbox.com> writes:

> When running ERT tests in batch mode, the conservative values
> chosen for `print-level` and `print-length` sometimes make it
> difficult to see what exactly is wrong.  This patch introduces
> two new variables (`ert-batch-print-level` &
> `ert-batch-print-length`) that one can use to customize them;
> e.g.
>    emacs -batch -l ert -l my-tests.el \
>          --eval "(let ((ert-batch-print-level 10) \
>                        (ert-batch-print-length 120)) \
>                    (ert-run-tests-batch-and-exit))"

Sounds like a good idea.

> +MESSAGE-FN should normally be nil; it is used for automated
> +self-tests and specify how to display messages."

I don't understand this bit, though.  If you want to test how this
function outputs messages, you can just `cl-letf' like this:

(cl-letf (((symbol-function 'message) ...

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]