forked from mirrors/org-mode
test-org-macs.el: Add test for template-expansion bug
* testing/lisp/test-org-macs.el (ert-deftest test-org/fill-template): There is a bug in `org-fill-template': it sorts and processes keys in order of increasing length, so that "noweb" is seen before "noweb-ref", and "tangle" before "tangle-mode". So in a template that includes "%noweb-ref", it will substitute the value of "noweb". This change includes a test for this bug. TINYCHANGE
This commit is contained in:
parent
5f184b5f23
commit
4a30e8cc0c
|
@ -106,7 +106,16 @@
|
|||
(should-not
|
||||
(org-test-with-temp-text "xx abc<point> xx"
|
||||
(org-in-regexp "abc" nil t))))
|
||||
|
||||
;;; Template
|
||||
|
||||
(ert-deftest test-org/fill-template ()
|
||||
"Test `org-fill-template'"
|
||||
(should
|
||||
(string= "working"
|
||||
(org-fill-template "%var-long"
|
||||
'(("var" . "broken")
|
||||
("var-long" . "working"))))))
|
||||
|
||||
;;; Time
|
||||
|
||||
|
|
Loading…
Reference in a new issue