emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 4a30e8cc0c 1/2: test-org-macs.el: Add test for temp


From: ELPA Syncer
Subject: [elpa] externals/org 4a30e8cc0c 1/2: test-org-macs.el: Add test for template-expansion bug
Date: Sat, 30 Apr 2022 05:57:40 -0400 (EDT)

branch: externals/org
commit 4a30e8cc0cd37c173324a5c1d6384b5ed5798ea9
Author: Andrew Arensburger <arensb>
Commit: Ihor Radchenko <yantar92@gmail.com>

    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
---
 testing/lisp/test-org-macs.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/testing/lisp/test-org-macs.el b/testing/lisp/test-org-macs.el
index 05cef12810..93f00a4c51 100644
--- a/testing/lisp/test-org-macs.el
+++ b/testing/lisp/test-org-macs.el
@@ -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
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]