test-ein-completer.el 763 B

123456789101112131415161718192021222324
  1. (eval-when-compile (require 'cl))
  2. (require 'ert)
  3. (when load-file-name
  4. (add-to-list 'load-path
  5. (concat (file-name-directory load-file-name) "mocker")))
  6. (require 'mocker)
  7. (require 'ein-completer)
  8. (ert-deftest ein:completer-finish-completing ()
  9. (let* ((matched-text 'dummy-matched-text-value) ; value can be anything
  10. (matches 'dummy-matches-value)
  11. (content (list :matched_text matched-text
  12. :matches matches))
  13. (args '(:extend t)))
  14. (mocker-let
  15. ((ein:completer-choose () ((:output 'completer)))
  16. (completer
  17. (matched-text matches &rest args)
  18. ((:input (list matched-text matches args)))))
  19. (ein:completer-finish-completing args content '-not-used-))))