]> git.eshelyaron.com Git - emacs.git/commitdiff
Take care of a FIXME in cus-edit-tests.el
authorMauro Aranda <maurooaranda@gmail.com>
Fri, 20 Nov 2020 21:37:30 +0000 (18:37 -0300)
committerMauro Aranda <maurooaranda@gmail.com>
Fri, 20 Nov 2020 21:37:30 +0000 (18:37 -0300)
* 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

index 4d148b4f411c716758219c7ae6353f026d02a3b1..114e461b7aca7c3f1a09154f291ea54b4e7a91bc 100644 (file)
     (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