I'm writing some tests for my first emacs package but am running into an issue to do with asserting that two text properties are the same - one that's created with #
and another with propertize
:
;; this fails
(ert-deftest equal-properties ()
(should
(equal-including-properties
#("Utils" 0 5 (:annotation nil :candidate "type" :meta nil))
(propertize "Utils" :annotation nil :candidate "type" :meta nil))))
In the ert runner, the forms look the same as well:
F equal-properties
(ert-test-failed
((should
(equal-including-properties
#("Utils" 0 5
(:meta nil :candidate "type" :annotation nil))
(propertize "Utils" :annotation nil :candidate "type" :meta nil)))
:form
(equal-including-properties
#("Utils" 0 5
(:meta nil :candidate "type" :annotation nil))
#("Utils" 0 5
(:meta nil :candidate "type" :annotation nil)))
:value nil))
Any pointers would be much appreciated, I'm sure (/I hope) I've missed something simple!
equal-including-properties
useseq
to compare property values