Browse Source

tests of fixed subtree property accumulated behavior

Eric Schulte 13 years ago
parent
commit
47eb35bb89
2 changed files with 16 additions and 0 deletions
  1. 10 0
      testing/examples/normal.org
  2. 6 0
      testing/lisp/test-org.el

+ 10 - 0
testing/examples/normal.org

@@ -16,3 +16,13 @@ Here are a couple of code blocks.
   ;; 94839181-184f-4ff4-a72f-94214df6f5ba
   (message "I am code")
 #+end_src
+* accumulating properties in drawers
+ :PROPERTIES:
+ :var+:     bar=2
+ :var:      foo=1
+ :ID:       75282ba2-f77a-4309-a970-e87c149fe125
+ :END:
+
+#+begin_src emacs-lisp :results silent
+ (list bar foo)
+#+end_src

+ 6 - 0
testing/lisp/test-org.el

@@ -92,6 +92,12 @@ http://article.gmane.org/gmane.emacs.orgmode/21459/"
     "http://some.host.com/form?&id=blah%2Bblah25"
     (org-link-unescape (org-link-escape "http://some.host.com/form?&id=blah%2Bblah25")))))
 
+(ert-deftest test-org/accumulated-properties-in-drawers ()
+  "Ensure properties accumulate in subtree drawers."
+  (org-test-at-id "75282ba2-f77a-4309-a970-e87c149fe125"
+    (org-babel-next-src-block)
+    (should (equal '(2 1) (org-babel-execute-src-block)))))
+
 (provide 'test-org)
 
 ;;; test-org.el ends here