[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole f0f3d25ae5 122/143: Matsl rsw make hide show
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole f0f3d25ae5 122/143: Matsl rsw make hide show test accept different section headings (#466) |
Date: |
Mon, 19 Feb 2024 15:59:26 -0500 (EST) |
branch: externals/hyperbole
commit f0f3d25ae59798683ef447173fc9f02f234f9a69
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>
Matsl rsw make hide show test accept different section headings (#466)
* Remove strict check on section header for hide and show commands
Accept both hidden and shown section header for first line test since
that differs between org versions. Let rest of checks verify that
outline after point is correct.
* Expand test verification strings
---
ChangeLog | 8 ++++
test/hyrolo-tests.el | 110 +++++++++++++++++++++++++++++++++++----------------
2 files changed, 84 insertions(+), 34 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 23b0ed50f8..3a7c5ce484 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-02-08 Mats Lidell <matsl@gnu.org>
+
+* test/hyrolo-tests.el: Make hide tests more forgiving about hiding
+ section headers. Allows test cases to be used with different versions
+ of org.
+ Expand test verification strings so it is easier to view the expected
+ outcome.
+
2024-02-05 Bob Weiner <rsw@gnu.org>
* Makefile (README.md.html): Rewrote to use md_toc and pandoc programs for
greater
diff --git a/test/hyrolo-tests.el b/test/hyrolo-tests.el
index 8a007156db..82edf07c59 100644
--- a/test/hyrolo-tests.el
+++ b/test/hyrolo-tests.el
@@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 19-Jun-21 at 22:42:00
-;; Last-Mod: 1-Feb-24 at 23:47:50 by Mats Lidell
+;; Last-Mod: 8-Feb-24 at 13:57:13 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -1093,7 +1093,6 @@ optional BEGIN and END only return that part of the
buffer."
(ert-deftest hyrolo-tests--outline-hide-other ()
"Verify `hyrolo-outline-hide-other' hides except current body, parent and
top-level headings."
- (skip-unless (< 28 emacs-major-version)) ;; Different behavior in older
Emacs versions
(let* ((org-file1 (make-temp-file "hypb" nil ".org"
hyrolo-tests--outline-content-org))
(hyrolo-file-list (list org-file1)))
(unwind-protect
@@ -1104,7 +1103,12 @@ optional BEGIN and END only return that part of the
buffer."
(should (= (point) 1))
(hyrolo-outline-hide-other)
(should (string-match-p
- (concat "^===+" (regexp-quote "...\n* h-org 1...\n* h-org
2...\n") "$")
+ (concat "^\\(===+.*[^*]\\|" (regexp-quote "...\n") "\\)"
+ (regexp-quote "\
+* h-org 1...
+* h-org 2...
+"
+ ) "$")
(hyrolo-tests--outline-as-string)))
;; On first header
@@ -1113,9 +1117,11 @@ optional BEGIN and END only return that part of the
buffer."
(search-forward "* h-org 1")
(beginning-of-line)
(hyrolo-outline-hide-other)
- (should (string= "...\n* h-org 1\nbody...\n* h-org 2...\n"
- (hyrolo-tests--outline-as-string)))
- (should (string= "* h-org 1\nbody...\n* h-org 2...\n"
+ (should (string= "\
+* h-org 1
+body...
+* h-org 2...
+"
(hyrolo-tests--outline-as-string (point))))
;; On second header
@@ -1124,9 +1130,11 @@ optional BEGIN and END only return that part of the
buffer."
(search-forward "** h-org 1.1")
(beginning-of-line)
(hyrolo-outline-hide-other)
- (should (string= "...\n* h-org 1\n...\n** h-org 1.1\nbody...\n*
h-org 2...\n"
- (hyrolo-tests--outline-as-string)))
- (should (string= "** h-org 1.1\nbody...\n* h-org 2...\n"
+ (should (string= "\
+** h-org 1.1
+body...
+* h-org 2...
+"
(hyrolo-tests--outline-as-string (point)))))
(kill-buffer hyrolo-display-buffer)
(hy-delete-files-and-buffers hyrolo-file-list))))
@@ -1134,7 +1142,6 @@ optional BEGIN and END only return that part of the
buffer."
(ert-deftest hyrolo-tests--outline-hide-sublevels ()
"Verify `hyrolo-outline-hide-sublevels' hides everything but the top levels."
- (skip-unless (< 28 emacs-major-version)) ;; Different behavior in older
Emacs versions
(let* ((org-file1 (make-temp-file "hypb" nil ".org"
hyrolo-tests--outline-content-org))
(hyrolo-file-list (list org-file1)))
(unwind-protect
@@ -1145,8 +1152,14 @@ optional BEGIN and END only return that part of the
buffer."
(should (= (point) 1))
(hyrolo-outline-hide-sublevels 1)
(should (= (point) 1))
- (should (string= "...\n* h-org 1...\n* h-org 2...\n"
- (hyrolo-tests--outline-as-string)))
+ (should (string-match-p
+ (concat "^\\(===+.*[^*]\\|" (regexp-quote "...\n") "\\)"
+ (regexp-quote "\
+* h-org 1...
+* h-org 2...
+"
+ ) "$")
+ (hyrolo-tests--outline-as-string)))
;; On first header
(goto-char (point-min))
@@ -1154,9 +1167,10 @@ optional BEGIN and END only return that part of the
buffer."
(search-forward "* h-org 1")
(beginning-of-line)
(hyrolo-outline-hide-sublevels 1)
- (should (string= "...\n* h-org 1...\n* h-org 2...\n"
- (hyrolo-tests--outline-as-string)))
- (should (string= "* h-org 1...\n* h-org 2...\n"
+ (should (string= "\
+* h-org 1...
+* h-org 2...
+"
(hyrolo-tests--outline-as-string (point))))
;; On second header
@@ -1165,9 +1179,10 @@ optional BEGIN and END only return that part of the
buffer."
(search-forward "** h-org 1.1")
(beginning-of-line)
(hyrolo-outline-hide-sublevels 1)
- (should (string= "...\n* h-org 1...\n* h-org 2...\n"
- (hyrolo-tests--outline-as-string)))
- (should (string= "1...\n* h-org 2...\n"
+ (should (string= "\
+1...
+* h-org 2...
+"
(hyrolo-tests--outline-as-string (point))))
;; First line - 2 levels
@@ -1175,8 +1190,17 @@ optional BEGIN and END only return that part of the
buffer."
(should (= (point) 1))
(hyrolo-outline-hide-sublevels 2)
(should (= (point) 1))
- (should (string= "...\n* h-org 1...\n** h-org 1.1...\n** h-org
1.2...\n* h-org 2...\n** h-org-2.1...\n"
- (hyrolo-tests--outline-as-string)))
+ (should (string-match-p
+ (concat "^\\(===+.*[^*]\\|" (regexp-quote "...\n") "\\)"
+ (regexp-quote "\
+* h-org 1...
+** h-org 1.1...
+** h-org 1.2...
+* h-org 2...
+** h-org-2.1...
+"
+ ) "$")
+ (hyrolo-tests--outline-as-string)))
;; On first header - 2 levels
(goto-char (point-min))
@@ -1184,9 +1208,13 @@ optional BEGIN and END only return that part of the
buffer."
(search-forward "* h-org 1")
(beginning-of-line)
(hyrolo-outline-hide-sublevels 2)
- (should (string= "...\n* h-org 1...\n** h-org 1.1...\n** h-org
1.2...\n* h-org 2...\n** h-org-2.1...\n"
- (hyrolo-tests--outline-as-string)))
- (should (string= "* h-org 1...\n** h-org 1.1...\n** h-org 1.2...\n*
h-org 2...\n** h-org-2.1...\n"
+ (should (string= "\
+* h-org 1...
+** h-org 1.1...
+** h-org 1.2...
+* h-org 2...
+** h-org-2.1...
+"
(hyrolo-tests--outline-as-string (point))))
;; On second header - 2 levels
@@ -1195,17 +1223,18 @@ optional BEGIN and END only return that part of the
buffer."
(search-forward "** h-org 1.1")
(beginning-of-line)
(hyrolo-outline-hide-sublevels 2)
- (should (string=
- "...\n* h-org 1...\n** h-org 1.1...\n** h-org 1.2...\n*
h-org 2...\n** h-org-2.1...\n"
- (hyrolo-tests--outline-as-string)))
- (should (string= "** h-org 1.1...\n** h-org 1.2...\n* h-org 2...\n**
h-org-2.1...\n"
+ (should (string= "\
+** h-org 1.1...
+** h-org 1.2...
+* h-org 2...
+** h-org-2.1...
+"
(hyrolo-tests--outline-as-string (point)))))
(kill-buffer hyrolo-display-buffer)
(hy-delete-files-and-buffers hyrolo-file-list))))
(ert-deftest hyrolo-tests--hyrolo-outline-show-subtree ()
"Verify `hyrolo-hyrolo-outline-show-subtree' shows everything after heading
at deeper levels."
- (skip-unless (< 28 emacs-major-version)) ;; Different behavior in older
Emacs versions
(let* ((org-file1 (make-temp-file "hypb" nil ".org"
hyrolo-tests--outline-content-org))
(hyrolo-file-list (list org-file1)))
(unwind-protect
@@ -1230,9 +1259,17 @@ optional BEGIN and END only return that part of the
buffer."
(beginning-of-line)
(let ((original-look (hyrolo-tests--outline-as-string)))
(hyrolo-outline-show-subtree)
- (should (string= "...\n* h-org 1\nbody\n** h-org 1.1\nbody\n**
h-org 1.2\nbody\n*** h-org 1.2.1\nbody\n* h-org 2...\n"
- (hyrolo-tests--outline-as-string)))
- (should (string= "* h-org 1\nbody\n** h-org 1.1\nbody\n** h-org
1.2\nbody\n*** h-org 1.2.1\nbody\n* h-org 2...\n"
+ (should (string= "\
+* h-org 1
+body
+** h-org 1.1
+body
+** h-org 1.2
+body
+*** h-org 1.2.1
+body
+* h-org 2...
+"
(hyrolo-tests--outline-as-string (point))))
;; Hide it again
(hyrolo-outline-hide-subtree)
@@ -1246,9 +1283,14 @@ optional BEGIN and END only return that part of the
buffer."
(beginning-of-line)
(let ((original-look (hyrolo-tests--outline-as-string)))
(hyrolo-outline-show-subtree)
- (should (string= "...\n* h-org 1...\n** h-org 1.1...\n** h-org
1.2\nbody\n*** h-org 1.2.1\nbody\n* h-org 2...\n** h-org-2.1...\n"
- (hyrolo-tests--outline-as-string)))
- (should (string= "** h-org 1.2\nbody\n*** h-org 1.2.1\nbody\n*
h-org 2...\n** h-org-2.1...\n"
+ (should (string= "\
+** h-org 1.2
+body
+*** h-org 1.2.1
+body
+* h-org 2...
+** h-org-2.1...
+"
(hyrolo-tests--outline-as-string (point))))
;; Hide it again
(hyrolo-outline-hide-subtree)
- [elpa] externals/hyperbole f4e323542d 116/143: Disable three failing tests for Emacs older than 29 (#461), (continued)
- [elpa] externals/hyperbole f4e323542d 116/143: Disable three failing tests for Emacs older than 29 (#461), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole a7a7f74859 125/143: Add i- and ebut:act functions and tests, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole f1fa9363e8 119/143: Matsl rsw silence warnings again (#463), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 4bf1bc3ca2 126/143: Check ebut:act and ibut:act is called with the right but category, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 18ae76fa49 132/143: Merge pull request #462 from rswgnu/matsl-rsw-fix-ebut-act, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 85b31fed86 130/143: Remove inconsistent dash in test data, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole a8cdad694b 141/143: Fix `hyrolo-min-matched-level' and hyrolo-top-level test, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 0e242bc1ae 031/143: Merge remote branch 'rsw' of hyperbole into rsw, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole a7efb9be79 042/143: FAST-DEMO include ert test in file to avoid loading all test files, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 0089f973e9 117/143: Skip test if apropos command is not available (#464), ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole f0f3d25ae5 122/143: Matsl rsw make hide show test accept different section headings (#466),
ELPA Syncer <=
- [elpa] externals/hyperbole 04e6b302c1 118/143: HyRolo updates to improve file heading handling, markdown headers, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 89ccef8e86 121/143: Merge branch 'rsw' of hyperbole into rsw, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole c742ee8deb 138/143: hyrolo.el - disable reveal-mode and make TAB/S-TAB expand subtree, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 320352f3c4 024/143: Set enable-local-variables to nil for tests with DEMO and FAST-DEMO, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole c02aa4d417 045/143: hypb-ert-def-at-p - fix rexexp bug with Action Key edebug testing, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole c6597714ea 096/143: Merge pull request #447 from rswgnu/matsl-rsw-remove-skip-unless-not-interactive, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 13915afa9f 123/143: Rename ebut:act to ebut:act-label, ELPA Syncer, 2024/02/19
- [elpa] externals/hyperbole 27461eb409 134/143: Merge pull request #467 from rswgnu/matsl-rsw-add-top-view-n-overview-tests, ELPA Syncer, 2024/02/19