summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Reuße <seb@wirrsal.net>2018-03-13 17:51:44 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-03-20 09:18:01 +0100
commit681f870b25a2005f76c99a929a0f5c9b3b481a6b (patch)
treeb524e50d68e6f8b4582e273f8f49078ec7040b8d
parent55d807f34826e5c559a36b62b235b0d3a0f4814e (diff)
downloadorg-mode-681f870b25a2005f76c99a929a0f5c9b3b481a6b.tar.gz
Extend org-sort-entries test
* test-org.el (test-org/sort-entries): Test with empty headings.
-rw-r--r--testing/lisp/test-org.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 67337de..e97dfe7 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -2745,6 +2745,11 @@ http://article.gmane.org/gmane.emacs.orgmode/21459/"
(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 @@ http://article.gmane.org/gmane.emacs.orgmode/21459/"
(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"