[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/org-edna 24a2837 38/72: Added tests for considerations
From: |
Ian Dunn |
Subject: |
[elpa] scratch/org-edna 24a2837 38/72: Added tests for considerations |
Date: |
Sun, 21 May 2017 21:11:24 -0400 (EDT) |
branch: scratch/org-edna
commit 24a28376a18ce46f2d663cca9fc23ea3df34b362
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>
Added tests for considerations
---
org-edna-tests.el | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/org-edna-tests.el b/org-edna-tests.el
index d304c2a..3ffc5a8 100644
--- a/org-edna-tests.el
+++ b/org-edna-tests.el
@@ -150,6 +150,28 @@
;; Consideration
+(ert-deftest org-edna-consideration/all ()
+ (let ((blocks-blocking `("a" nil "b"))
+ (blocks-no-blocking `(nil nil nil)))
+ (should (string-equal (org-edna-handle-consideration 'all blocks-blocking)
"a"))
+ (should (not (org-edna-handle-consideration 'all blocks-no-blocking)))))
+
+(ert-deftest org-edna-consideration/integer ()
+ (let ((blocks-blocking `("a" "c" "b"))
+ (blocks-no-blocking `("a" nil "b"))
+ (blocks-empty `(nil nil nil)))
+ (should (string-equal (org-edna-handle-consideration 1 blocks-blocking)
"a"))
+ (should (not (org-edna-handle-consideration 1 blocks-no-blocking)))
+ (should (not (org-edna-handle-consideration 1 blocks-empty)))))
+
+(ert-deftest org-edna-consideration/float ()
+ (let ((blocks-blocking `("a" "c" "b"))
+ (blocks-no-blocking `("a" nil "b"))
+ (blocks-empty `(nil nil nil)))
+ (should (string-equal (org-edna-handle-consideration 0.25 blocks-blocking)
"a"))
+ (should (not (org-edna-handle-consideration 0.25 blocks-no-blocking)))
+ (should (not (org-edna-handle-consideration 0.25 blocks-empty)))))
+
(provide 'org-edna-tests)
;;; org-edna-tests.el ends here
- [elpa] scratch/org-edna 4a54e3b 09/72: Fixed headings condition, (continued)
- [elpa] scratch/org-edna 4a54e3b 09/72: Fixed headings condition, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna dcbb344 18/72: Fixed up indenting, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna ef34291 26/72: Fixed chain-find, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 6cd8a40 28/72: Added test for parsing multiple forms, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 3e1ed0c 29/72: Added re-search condition, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna c49aeba 36/72: Fixed consideration handling, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 1dfc66f 01/72: Initial Commit., Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna f05cf5e 23/72: Created finders for compatibility with org-depend, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna e8fc9d5 33/72: Added test for todo action, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 70f949c 35/72: Added note about quoting file names to documentation., Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 24a2837 38/72: Added tests for considerations,
Ian Dunn <=
- [elpa] scratch/org-edna 4b91a43 25/72: Added file for tests, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna bb284dc 27/72: Fixed parsing bug, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna d248565 21/72: Fix uses of substring, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 7978874 24/72: Added tests for ids and match finders, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 6448307 30/72: Added test for empty argument list, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 9e4d833 32/72: Fixed error in re-search, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna d022d2f 40/72: Added copyright and licensing information to all files, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna 991782f 31/72: Added documentation for each condition, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna d527569 48/72: Handle all errors in Edna forms, Ian Dunn, 2017/05/21
- [elpa] scratch/org-edna f27a89f 45/72: Use example instead of src to make HTML export prettier, Ian Dunn, 2017/05/21