[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 26ff11d198: Add rolo-sort test (#179)
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 26ff11d198: Add rolo-sort test (#179) |
Date: |
Tue, 22 Mar 2022 18:57:32 -0400 (EDT) |
branch: externals/hyperbole
commit 26ff11d198ace3ec23437dc9ed458fabca650f93
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>
Add rolo-sort test (#179)
---
ChangeLog | 3 +++
test/hyrolo-tests.el | 42 ++++++++++++++++++++++++++++++++++++++++--
2 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 711ac1675a..7ebf46475d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,9 @@
2022-03-20 Mats Lidell <matsl@gnu.org>
+* test/hyrolo-tests.el (hyrolo-sort-records-at-different-levels): Add test
+ for rolo sort.
+
* test/hmouse-drv-tests.el (hbut-key-press-on-hyphen-in-elisp-symbol): Add
test case.
diff --git a/test/hyrolo-tests.el b/test/hyrolo-tests.el
index 4ff64e3dbe..7c6d95eb54 100644
--- a/test/hyrolo-tests.el
+++ b/test/hyrolo-tests.el
@@ -3,9 +3,9 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 19-Jun-21 at 22:42:00
-;; Last-Mod: 6-Feb-22 at 00:58:33 by Bob Weiner
+;; Last-Mod: 20-Mar-22 at 19:57:17 by Mats Lidell
;;
-;; Copyright (C) 2021 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
;;
;; This file is part of GNU Hyperbole.
@@ -211,5 +211,43 @@
(should (looking-at-p "^\t[0-9/]+$"))))
(delete-file hyrolo-file))))
+(ert-deftest hyrolo-sort-records-at-different-levels ()
+ "Rolo can sort records at different levels."
+ (let ((hyrolo-file (make-temp-file "hypb" nil ".otl"
+ (concat "* 2\n\t2022-03-20\n"
+ "** 2\n\t2022-03-20\n"
+ "*** 2\n\t2022-03-20\n"
+ "*** 1\n\t2022-03-20\n"
+ "** 1\n\t2022-03-20\n"
+ "*** 2\n\t2022-03-20\n"
+ "*** 1\n\t2022-03-20\n"
+ "* 1\n\t2022-03-20\n"
+ "** 2\n\t2022-03-20\n"
+ "*** 2\n\t2022-03-20\n"
+ "*** 1\n\t2022-03-20\n"
+ "** 1\n\t2022-03-20\n"
+ "*** 2\n\t2022-03-20\n"
+ "*** 1\n\t2022-03-20\n")))
+ (sorted-hyrolo-file (concat "* 1\n\t2022-03-20\n"
+ "** 1\n\t2022-03-20\n"
+ "*** 1\n\t2022-03-20\n"
+ "*** 2\n\t2022-03-20\n"
+ "** 2\n\t2022-03-20\n"
+ "*** 1\n\t2022-03-20\n"
+ "*** 2\n\t2022-03-20\n"
+ "* 2\n\t2022-03-20\n"
+ "** 1\n\t2022-03-20\n"
+ "*** 1\n\t2022-03-20\n"
+ "*** 2\n\t2022-03-20\n"
+ "** 2\n\t2022-03-20\n"
+ "*** 1\n\t2022-03-20\n"
+ "*** 2\n\t2022-03-20\n")))
+ (unwind-protect
+ (let ((hyrolo-file-list (list hyrolo-file)))
+ (find-file hyrolo-file)
+ (hyrolo-sort)
+ (should (string= (buffer-string) sorted-hyrolo-file)))
+ (delete-file hyrolo-file))))
+
(provide 'hyrolo-tests)
;;; hyrolo-tests.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/hyperbole 26ff11d198: Add rolo-sort test (#179),
ELPA Syncer <=