summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Reuße <seb@wirrsal.net>2018-03-11 16:43:49 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-03-13 09:09:41 +0100
commit89ec5e198b07e21740d4e5080b64fd8fa2b35a53 (patch)
treea8a5e4bf3456169e7a9bfc5e89b107f16379f02b
parent0d6ee386a138a17decda203e8d3ce533d46e5796 (diff)
downloadorg-mode-89ec5e198b07e21740d4e5080b64fd8fa2b35a53.tar.gz
Fix org-table-sort-lines test
* 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.
-rw-r--r--testing/lisp/test-org-table.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el
index 850080c..d90caa8 100644
--- a/testing/lisp/test-org-table.el
+++ b/testing/lisp/test-org-table.el
@@ -1691,13 +1691,13 @@ See also `test-org-table/copy-field'."
(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 @@ See also `test-org-table/copy-field'."
(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))))