From: "Sebastian Reuße" <seb@wirrsal.net>
To: emacs-orgmode@gnu.org
Cc: "Sebastian Reuße" <seb@wirrsal.net>
Subject: [PATCH 3/6] Fix org-table-sort-lines test
Date: Sun, 11 Mar 2018 16:43:49 +0100 [thread overview]
Message-ID: <20180311154352.16920-3-seb@wirrsal.net> (raw)
In-Reply-To: <20180311154352.16920-1-seb@wirrsal.net>
* test-org-table.el (test-org-table/sort-lines): Fix and improve
testcase.
Sorting and reversing «a C b» should result in «C b a», not in «b a
C». This test did not fail previously only because
org-table-sort-lines had an issue whereby sorts were always
case-sensitive.
---
testing/lisp/test-org-table.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el
index 850080c7a..d90caa8e9 100644
--- a/testing/lisp/test-org-table.el
+++ b/testing/lisp/test-org-table.el
@@ -1691,13 +1691,13 @@
(buffer-string))))
;; Sort alphabetically.
(should
- (equal "| a | x |\n| b | 4 |\n| c | 3 |\n"
- (org-test-with-temp-text "| <point>a | x |\n| c | 3 |\n| b | 4 |\n"
+ (equal "| a | x |\n| B | 4 |\n| c | 3 |\n"
+ (org-test-with-temp-text "| <point>a | x |\n| c | 3 |\n| B | 4 |\n"
(org-table-sort-lines nil ?a)
(buffer-string))))
(should
- (equal "| c | 3 |\n| b | 4 |\n| a | x |\n"
- (org-test-with-temp-text "| <point>a | x |\n| c | 3 |\n| b | 4 |\n"
+ (equal "| c | 3 |\n| B | 4 |\n| a | x |\n"
+ (org-test-with-temp-text "| <point>a | x |\n| c | 3 |\n| B | 4 |\n"
(org-table-sort-lines nil ?A)
(buffer-string))))
;; Sort alphabetically with case.
@@ -1707,7 +1707,7 @@
(org-table-sort-lines t ?a)
(buffer-string))))
(should
- (equal "| b |\n| a |\n| C |\n"
+ (equal "| C |\n| b |\n| a |\n"
(org-test-with-temp-text "| <point>a |\n| C |\n| b |\n"
(org-table-sort-lines nil ?A)
(buffer-string))))
--
2.16.2
next prev parent reply other threads:[~2018-03-11 15:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-11 15:43 [PATCH 1/6] Fix alphabetic sorting for tables, plain lists Sebastian Reuße
2018-03-11 15:43 ` [PATCH 2/6] Fix alphabetic string matching operators Sebastian Reuße
2018-03-11 16:09 ` [PATCH] " Sebastian Reuße
2018-03-13 8:13 ` Nicolas Goaziou
2018-03-11 16:11 ` [PATCH 2/6] " Sebastian Reuße
2018-03-11 15:43 ` Sebastian Reuße [this message]
2018-03-13 8:13 ` [PATCH 3/6] Fix org-table-sort-lines test Nicolas Goaziou
2018-03-11 15:43 ` [PATCH 4/6] Fix string-collate-lessp shim Sebastian Reuße
2018-03-13 8:12 ` Nicolas Goaziou
2018-03-11 15:43 ` [PATCH 5/6] org-table-sort-lines: Fix case-sensitive sorting Sebastian Reuße
2018-03-13 8:13 ` Nicolas Goaziou
2018-03-11 15:43 ` [PATCH 6/6] Improve ‘org-sort-list’ test Sebastian Reuße
2018-03-13 8:13 ` Nicolas Goaziou
2018-03-13 8:12 ` [PATCH 1/6] Fix alphabetic sorting for tables, plain lists 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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180311154352.16920-3-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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).