emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: testcover: setf-method and treatment of `defcustom'


From: Stefan Merten
Subject: Re: testcover: setf-method and treatment of `defcustom'
Date: Wed, 12 Sep 2012 21:32:47 +0200

Hi!

2 days ago Stefan Merten wrote:
> I still had another error left, however.
> 
>        Value of form marked with `1value' does vary: ...
> 
> It took me some time to discover that for some reason `testcover'
> treats `defcustom' like `defconst'. This is of course lethal for a
> test which changes a customizable variable temporarily - e.g. by `let'
> - to test a certain functionality.

I now used `testcover' intensively and can see why there is a wish to
treat a `defcustom' like a `defconst'. If you treat a `defcustom' like
a normal `defvar' you get a brown splotch (i.e. the form had only a
single value) for all the `defcustom' variables. This is annoying.

OTOH in automated tests you *want* to override a `defcustom' to test
behavior with a different customization. So treating `defcustom' as
`defconst' unconditionally is certainly not an option.

The natural thing which comes to mind is to create a configuration
option here. For instance there could be another customizable
`testcover' variable which lists all the `defcustom' variables you
*do* want to treat as a variable.

How does this sound?


                                                Grüße

                                                Stefan

Attachment: pgpHgPPB2c3C_.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]