emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [PATCH 1/2] Extend org-sort-entries test


From: Sebastian Reuße
Subject: [O] [PATCH 1/2] Extend org-sort-entries test
Date: Tue, 13 Mar 2018 17:51:44 +0100

* test-org.el (test-org/sort-entries): Test with empty headings.
---
 testing/lisp/test-org.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 33769aafa..8c98fce4d 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -2745,6 +2745,11 @@
          (org-test-with-temp-text "\n* def\n* xyz\n* abc\n"
            (org-sort-entries nil ?A)
            (buffer-string))))
+  (should
+   (equal "\n* \n* klm\n* xyz\n"
+         (org-test-with-temp-text "\n* xyz\n* \n* klm\n"
+           (org-sort-entries nil ?a)
+           (buffer-string))))
   ;; Sort numerically.
   (should
    (equal "\n* 1\n* 2\n* 10\n"
@@ -2756,6 +2761,11 @@
          (org-test-with-temp-text "\n* 10\n* 1\n* 2\n"
            (org-sort-entries nil ?N)
            (buffer-string))))
+  (should
+   (equal "\n* \n* 1\n* 2\n"
+         (org-test-with-temp-text "\n* 1\n* \n* 2\n"
+           (org-sort-entries nil ?n)
+           (buffer-string))))
   ;; Sort by custom function.
   (should
    (equal "\n* b\n* aa\n* ccc\n"
-- 
2.16.2




reply via email to

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