From: "Sebastian Reuße" <seb@wirrsal.net>
To: emacs-orgmode@gnu.org
Cc: "Sebastian Reuße" <seb@wirrsal.net>
Subject: [PATCH 1/2] Extend org-sort-entries test
Date: Tue, 13 Mar 2018 17:51:44 +0100 [thread overview]
Message-ID: <20180313165145.27160-2-seb@wirrsal.net> (raw)
In-Reply-To: <20180313165145.27160-1-seb@wirrsal.net>
* 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
next prev parent reply other threads:[~2018-03-13 16:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 16:51 [BUG] org-sort-entries errors out when headline is empty Sebastian Reuße
2018-03-13 16:51 ` Sebastian Reuße [this message]
2018-03-13 16:51 ` [PATCH 2/2] Guard against empty headings when sorting Sebastian Reuße
2018-03-20 8:53 ` [BUG] org-sort-entries errors out when headline is empty Nicolas Goaziou
2018-03-23 10:43 ` Sebastian Reuße
2018-04-20 9:30 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180313165145.27160-2-seb@wirrsal.net \
--to=seb@wirrsal.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.