emacs-diffs
[Top][All Lists]
Advanced

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

master 6924320: Take care of a FIXME in cus-edit-tests.el


From: Mauro Aranda
Subject: master 6924320: Take care of a FIXME in cus-edit-tests.el
Date: Fri, 20 Nov 2020 16:38:05 -0500 (EST)

branch: master
commit 6924320aebce9ba885877da45e43d8d573da8bf6
Author: Mauro Aranda <maurooaranda@gmail.com>
Commit: Mauro Aranda <maurooaranda@gmail.com>

    Take care of a FIXME in cus-edit-tests.el
    
    * test/lisp/cus-edit-tests.el 
(cus-edit-tests-customize-saved/show-obsolete):
    Add a fake saved-value property, to be able check that the obsolete
    option is present in the Customize buffer.  Expect the test to pass
    now.
---
 test/lisp/cus-edit-tests.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/lisp/cus-edit-tests.el b/test/lisp/cus-edit-tests.el
index 4d148b4..114e461 100644
--- a/test/lisp/cus-edit-tests.el
+++ b/test/lisp/cus-edit-tests.el
@@ -70,11 +70,13 @@
     (should (search-forward cus-edit-tests--obsolete-option-tag nil t))))
 
 (ert-deftest cus-edit-tests-customize-saved/show-obsolete ()
-  ;; FIXME: How to test for saved options?
-  :expected-result :failed
   (with-cus-edit-test "*Customize Saved*"
-    (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))))
 
 (provide 'cus-edit-tests)
 ;;; cus-edit-tests.el ends here



reply via email to

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