GNU bug report logs -
#66042
30.0.50; ERT test fails while trying to indent pretty-print
Previous Next
Full log
View this message in rfc822 format
Protesilaos Stavrou <info <at> protesilaos.com> writes:
> I have encountered a possible bug with an ERT test where it is trying to
> perform indentation and fails with:
>
> lisp-indent-initial-state: Wrong type argument: wholenump, -2
>
> This is the test I am running:
>
> (defun test-case (text pos expected)
> (with-temp-buffer
> (insert text)
> (goto-char pos)
> (backward-kill-word 1)
> (should (string-equal (buffer-string) expected))))
>
> (ert-deftest my-test ()
> (test-case "aaa)))" 7 "aaa"))
I can't reproduce this on current master. Evaluating the above two
forms in emacs -Q and then saying
M-x ert RET t RET
yields a new buffer "*ert*" containing
Selector: t
Passed: 0
Failed: 1 (1 unexpected)
Skipped: 0
Total: 1/1
Started at: 2023-09-17 13:44:28+0200
Finished.
Finished at: 2023-09-17 13:44:28+0200
F
F my-test
(ert-test-failed
((should (string-equal (buffer-string) expected)) :form
(string-equal "" "aaa") :value nil :explanation
(arrays-of-different-length 0 3 "" "aaa" first-mismatch-at 0)))
Which version of Emacs are you running?
Can you reproduce it in emacs -Q?
This bug report was last modified 1 year and 271 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.