]> code.delx.au - gnu-emacs-elpa/blobdiff - test/template-tests.el
Handle function pointers in annotation and template expansion
[gnu-emacs-elpa] / test / template-tests.el
index 09548c4234e857c05098bfd81fc8584583ee5e35..d589ebdce534ea5e73e85ee06a83be0a9474ed97 100644 (file)
       (forward-char -1)
       (should (equal "Dict<TKey, TValue>"
                      (overlay-get (company-template-field-at) 'display))))))
+
+(ert-deftest company-template-c-like-func-ptr ()
+  (with-temp-buffer
+    (let ((text "foo(*)(int)"))
+      (insert text)
+      (company-template-c-like-templatify text)
+      (should (equal "foo(arg0)" (buffer-string)))
+      (should (looking-at "arg0"))
+      (should (equal "int" (overlay-get (company-template-field-at) 'display))))))