GNU bug report logs -
#51037
[PATCH] Make `print-level` & `print-length` customizable in ERT batch tests
Previous Next
Reported by: Michael <sp1ff <at> runbox.com>
Date: Tue, 5 Oct 2021 14:51:02 UTC
Severity: wishlist
Tags: patch
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #117 received at 51037 <at> debbugs.gnu.org (full text, mbox):
On 18/11/2021 10:27 +0100, Lars Ingebrigtsen wrote:
> Filipp Gunbin <fgunbin <at> fastmail.fm> writes:
>
>> The docstring for backtrace-line-length says: "If set to nil or zero,
>> backtrace mode will not abbreviate the forms it prints." So the above
>> sentence, which I removed, was indeed not true? (a quick look over
>> its usages confirmed that to me, but I'd like someone else to check)
>
> I think the intention is that a nil value of backtrace-line-length
> shouldn't limit the lengths -- but I haven't tested it. Doesn't it
> work?
ert-batch-print-length/level are 10 by default, and print-length/level
are let-bound to them during ert batch runs. With these values, the
backtraces should be limited, if backtrace-line-length says so.
Then we go:
emacs --batch -l ert \
--eval "
(setq ert-batch-backtrace-right-margin nil
backtrace-line-length 50
ert-batch-backtrace-line-length t)
" \
--eval '(ert-deftest my-test () (error "test error"))' \
-f ert-run-tests-batch-and-exit
The output is limited.
Try the same with ert-batch-backtrace-line-length nil in --eval, and the
output is not limited at all. So none of (ert-batch-)print-level/length
get into play.
So I think I'll install my patch now..
Filipp
This bug report was last modified 3 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.