test-ein-ac.el 586 B

123456789101112131415161718
  1. (eval-when-compile (require 'cl))
  2. (require 'ert)
  3. (require 'ein-ac)
  4. (require 'ein-testing-kernel)
  5. (ert-deftest ein:ac-set-document ()
  6. (let ((string "candidate string"))
  7. (should-not (get-text-property 0 'document string))
  8. (ein:testing-kernel-construct-help-string-loop
  9. (lambda (content result)
  10. (ein:ac-set-document string content '-not-used-)
  11. (let ((props (text-properties-at 0 string)))
  12. ;; document property may be nil, but must be set.
  13. (should (member 'document props))
  14. (should (equal (plist-get props 'document) result)))))))