From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Sebastian=20Reu=C3=9Fe?= Subject: [PATCH 1/2] Extend org-sort-entries test Date: Tue, 13 Mar 2018 17:51:44 +0100 Message-ID: <20180313165145.27160-2-seb@wirrsal.net> References: <20180313165145.27160-1-seb@wirrsal.net> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evnA5-0005uj-CJ for emacs-orgmode@gnu.org; Tue, 13 Mar 2018 12:52:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evnA4-0002wA-M2 for emacs-orgmode@gnu.org; Tue, 13 Mar 2018 12:52:29 -0400 Received: from wirrsal.net ([188.68.36.149]:50326 helo=mail.wirrsal.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1evnA4-0002vu-FA for emacs-orgmode@gnu.org; Tue, 13 Mar 2018 12:52:28 -0400 In-Reply-To: <20180313165145.27160-1-seb@wirrsal.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Cc: =?UTF-8?q?Sebastian=20Reu=C3=9Fe?= * 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