From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Test succeeding only from edebug
Date: Mon, 5 Aug 2024 18:06:39 +0200 [thread overview]
Message-ID: <35e7f181-19e4-407b-acf6-7014b6ce98af@easy-emacs.de> (raw)
In-Reply-To: <87le1bhtop.fsf@web.de>
Am 05.08.24 um 17:32 schrieb Michael Heerdegen via Users list for the
GNU Emacs text editor:
> Andreas Röhler<andreas.roehler@easy-emacs.de> writes:
>
>> Hi,
>>
>> have a test succeeding when a core-function, ‘ar-thing-in-thing’, is
>> instrumented by edebug.
>> However. same tests fails when running normally.
> I'm a bit confused: is it a core function or a function defined by
> yourself?
Defined by myself.
>> See failure at
>>
>> https://app.circleci.com/pipelines/gh/andreas-roehler/thing-at-point-utils/82/workflows/e97906a0-d949-4f96-84be-f862265518f6/jobs/82
>>
>> Test in question is ‘ar-trim-braced-in-region-test’, from
>>
>> https://github.com/andreas-roehler/thing-at-point-utils/blob/master/test/ar-trim-tests.el
>>
>> ‘ar-thing-in-thing’ resides at
>>
>> https://github.com/andreas-roehler/thing-at-point-utils/blob/master/ar-thingatpt-basic-definitions.el
> Do you have a backtrace?
Not really. If interactively called, it fails like that:
Selector: ar-trim-braced-in-region-test
Passed: 0
Failed: 1 (1 unexpected)
Skipped: 0
Total: 1/1
Started at: 2024-08-05 17:51:53+0200
Finished.
Finished at: 2024-08-05 17:51:54+0200
F
F ar-trim-braced-in-region-test
(ert-test-failed
((should (eq (char-before) 102)) :form (eq 125 102) :value nil))
See also remote log as linked above.
However, it succeeds like that:
Edebug: ar-thing-in-thing
ar-thing-in-thing
[2 times]
Result: region
Result: (1 . 21)
[6 times]
Result: (1 . 21)
Result: 1 (#o1, #x1, ?\C-a)
Result: nil
[3 times]
Result: (1 . 21)
Result: 1 (#o1, #x1, ?\C-a)
Result: 1 (#o1, #x1, ?\C-a)
Result: 1 (#o1, #x1, ?\C-a)
[5 times]
Result: (1 . 21)
Result: 21 (#o25, #x15, ?\C-u)
Result: t
[2 times]
Result: (1 . 21)
Result: 21 (#o25, #x15, ?\C-u)
Result: 21 (#o25, #x15, ?\C-u)
Result: #<marker at 21 in *temp*-56307>
[4 times]
Result: 1 (#o1, #x1, ?\C-a)
Result: #<marker at 21 in *temp*-56307>
Result: nil
[2 times]
Result: 1 (#o1, #x1, ?\C-a)
Result: 1 (#o1, #x1, ?\C-a)
[3 times]
Result: nil
Result: nil
Result: nil
[5 times]
Result: nil
Result: t
[3 times]
Result: nil
Result: t
Result: t
[3 times]
Result: 1 (#o1, #x1, ?\C-a)
Result: 1 (#o1, #x1, ?\C-a)
[3 times]
Result: ar-th-trim
Result: braced
Result: t
[2 times]
Result: t
Result: t
Result: t
[4 times]
Result: nil
[2 times]
Result: braced
Result: nil
Result: nil
[4 times]
Result: braced
Result: 7 (#o7, #x7, ?\C-g)
Result: 7 (#o7, #x7, ?\C-g)
Result: 7 (#o7, #x7, ?\C-g)
Result: 7 (#o7, #x7, ?\C-g)
[4 times]
Result: nil
Result: t
[3 times]
Result: t
Result: nil
[2 times]
Result: 1 (#o1, #x1, ?\C-a)
[2 times]
Result: 7 (#o7, #x7, ?\C-g)
Result: t
Result: t
[3 times]
Result: 7 (#o7, #x7, ?\C-g)
Result: 7 (#o7, #x7, ?\C-g)
[3 times]
Result: ar-th-trim
Result: braced
Result: t
[2 times]
Result: t
Result: t
Result: t
[4 times]
Result: nil
[2 times]
Result: braced
Result: nil
Result: nil
[4 times]
Result: braced
Result: 12 (#o14, #xc, ?\C-l)
Result: 12 (#o14, #xc, ?\C-l)
Result: 12 (#o14, #xc, ?\C-l)
Result: 12 (#o14, #xc, ?\C-l)
[4 times]
Result: nil
Result: t
[3 times]
Result: t
Result: nil
[2 times]
Result: 7 (#o7, #x7, ?\C-g)
[2 times]
Result: 12 (#o14, #xc, ?\C-l)
Result: t
Result: t
[3 times]
Result: 12 (#o14, #xc, ?\C-l)
Result: 12 (#o14, #xc, ?\C-l)
[3 times]
Result: ar-th-trim
Result: braced
Result: t
[2 times]
Result: t
Result: t
Result: t
[4 times]
Result: nil
[2 times]
Result: braced
Result: nil
Result: nil
[4 times]
Result: braced
Result: 15 (#o17, #xf, ?\C-o)
Result: 15 (#o17, #xf, ?\C-o)
Result: 15 (#o17, #xf, ?\C-o)
Result: 15 (#o17, #xf, ?\C-o)
[4 times]
Result: t
Result: nil
Result: nil
Result: nil
Result: nil
Result: nil
Result: nil
Ran 1 tests, 1 results were as expected
---
Selector: ar-trim-braced-in-region-test
Passed: 1
Failed: 0
Skipped: 0
Total: 1/1
Started at: 2024-08-05 17:55:11+0200
Finished.
Finished at: 2024-08-05 17:55:31+0200
---
> Does the test case work using interpreted
> code?
Yes.
Here ist the test, which should remove all braces in buffer:
(ert-deftest ar-trim-braced-in-region-test ()
(ar-test-with-elisp-buffer-point-min
"{asdf} {asdf} {asdf}"
(goto-char (point-min))
(set-mark (point))
(end-of-line)
(ar-trim-braced-in-region-atpt)
(should (eq (char-before) ?f))))
> Or fails compiled and interpreted?
Usually don't compile my stuff.
A caveat: thing-at-point-utils loads a large bunch of commands, sorry
for that inconvenience.
Thanks for your care
>
> I guess I could find out all of that by myself but I wanted to get at
> least an idea where to look at before consulting your linked sources.
>
>
> Michael.
>
>
next prev parent reply other threads:[~2024-08-05 16:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 6:41 Test succeeding only from edebug Andreas Röhler
2024-08-05 15:32 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-08-05 16:06 ` Andreas Röhler [this message]
2024-08-06 1:49 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-08-06 7:16 ` Andreas Röhler
2024-08-06 14:53 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-08-06 18:21 ` Andreas Röhler
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=35e7f181-19e4-407b-acf6-7014b6ce98af@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=help-gnu-emacs@gnu.org \
/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.