all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Protesilaos Stavrou <info@protesilaos.com>, 66042@debbugs.gnu.org
Cc: Lei Zhu <julytreee@gmail.com>
Subject: bug#66042: 30.0.50; ERT test fails while trying to indent pretty-print
Date: Sun, 17 Sep 2023 04:47:29 -0700	[thread overview]
Message-ID: <CADwFkmkq_2qAROk1CanJP=85ZKdZ=u+HK_PXMaAHX+nOWHzPtg@mail.gmail.com> (raw)
In-Reply-To: <8734zd8gzx.fsf@protesilaos.com>

Protesilaos Stavrou <info@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?





  parent reply	other threads:[~2023-09-17 11:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-17  6:13 bug#66042: 30.0.50; ERT test fails while trying to indent pretty-print Protesilaos Stavrou
2023-09-17 11:46 ` Mauro Aranda
2023-09-17 11:47 ` Stefan Kangas [this message]
2023-09-18  4:54   ` Protesilaos Stavrou
2023-09-18  9:30     ` Mauro Aranda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmkq_2qAROk1CanJP=85ZKdZ=u+HK_PXMaAHX+nOWHzPtg@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=66042@debbugs.gnu.org \
    --cc=info@protesilaos.com \
    --cc=julytreee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.