unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Dynamic modules: should should-error work?
Date: Tue, 24 Nov 2015 19:27:32 +0000	[thread overview]
Message-ID: <CAArVCkRyM7CiLBHcyartSdBfjuVLSododgU9CSiJ97oZYe9BLQ@mail.gmail.com> (raw)
In-Reply-To: <83si3wzdeb.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

Eli Zaretskii <eliz@gnu.org> schrieb am Mo., 23. Nov. 2015 um 21:09 Uhr:

> +  (let ((descr (should-error (mod-test-sum 1 2 3))))
> +    (should (eq (car descr) 'wrong-number-of-arguments))
>

I think testing using :type would also accept subtypes of the given type,
which I think would be preferrable (I'd expect that generally subtypes of
the documented signals are allowed to be thrown).


> +    (should (stringp (nth 1 descr)))
> +    (should (eq 0
> +                (string-match "#<module function at
> \\(0x\\)?[0-9a-fA-F]+>"
> +                              (nth 1 descr))))
> +    (should (= (nth 2 descr) 3))))
>
>
Maybe replace the regex with "\\`#<module function.*>\\'" to make it work
if dladdr is available.

[-- Attachment #2: Type: text/html, Size: 1247 bytes --]

  reply	other threads:[~2015-11-24 19:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-22 18:28 Dynamic modules: should should-error work? Eli Zaretskii
2015-11-23 19:28 ` Philipp Stephani
2015-11-23 20:09   ` Eli Zaretskii
2015-11-24 19:27     ` Philipp Stephani [this message]
2015-11-24 19:32       ` Eli Zaretskii
2015-12-07 20:09         ` Philipp Stephani
2015-12-07 20:18           ` Eli Zaretskii
2015-11-24 19:15   ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CAArVCkRyM7CiLBHcyartSdBfjuVLSododgU9CSiJ97oZYe9BLQ@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).