|
From: | Stefan Monnier |
Subject: | Re: master 6924320: Take care of a FIXME in cus-edit-tests.el |
Date: | Fri, 20 Nov 2020 16:57:57 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> - (customize-saved) > - (should (search-forward cus-edit-tests--obsolete-option-tag nil t)))) > + (unwind-protect > + (progn > + (put 'cus-edit-tests--obsolete-option-tag 'saved-value '(t)) > + (customize-saved) > + (should (search-forward cus-edit-tests--obsolete-option-tag nil > t))) > + (put 'cus-edit-tests--obsolete-option-tag 'saved-value nil)))) These are (fairly rare) good use-cases for `cl-letf`: (cl-letf (((get 'cus-edit-tests--obsolete-option-tag 'saved-value) '(t))) (customize-saved) (should (search-forward cus-edit-tests--obsolete-option-tag nil t))) -- Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |