[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit 22f4729ae9 150/301: Add test case for iedit-hide-unm
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit 22f4729ae9 150/301: Add test case for iedit-hide-unmatched-lines |
Date: |
Mon, 10 Jan 2022 22:58:58 -0500 (EST) |
branch: elpa/iedit
commit 22f4729ae9f27103861db1c847b4cd016ed39bfb
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>
Add test case for iedit-hide-unmatched-lines
---
iedit-lib.el | 5 +++--
iedit-tests.el | 28 +++++++++++++++++++++++++---
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/iedit-lib.el b/iedit-lib.el
index 05128bb59f..bac0451a51 100644
--- a/iedit-lib.el
+++ b/iedit-lib.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2012-12-22 23:52:42 Victor Ren>
+;; Time-stamp: <2013-01-19 00:31:41 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region simultaneous rectangle refactoring
;; Version: 0.97
@@ -535,7 +535,8 @@ value of `iedit-occurrence-context-lines' is used for this
time."
(set (make-local-variable 'line-move-ignore-invisible) t)
(add-to-invisibility-spec '(iedit-invisible-overlay-name . t))
(dolist (unmatch unmatched-lines)
- (iedit-make-unmatched-lines-overlay (car unmatch) (cadr
unmatch)))))))
+ (iedit-make-unmatched-lines-overlay (car unmatch) (cadr unmatch)))))
+ unmatched-lines))
;;;; functions for overlay keymap
(defun iedit-apply-on-occurrences (function &rest args)
diff --git a/iedit-tests.el b/iedit-tests.el
index 4e21a13f3f..cdba17640c 100644
--- a/iedit-tests.el
+++ b/iedit-tests.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2013-01-18 17:30:39 Victor Ren>
+;; Time-stamp: <2013-01-19 21:32:53 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Version: 0.97
;; X-URL: http://www.emacswiki.org/emacs/Iedit
@@ -536,7 +536,7 @@ arfoo
"a
(defun foo (foo bar foo)
\"foo bar foobar\" nil)
-(defun bar (bar foo bar)
+ (defun bar (bar foo bar)
\"bar foo barfoo\" nil)"
(lambda ()
(iedit-mode)
@@ -560,7 +560,7 @@ arfoo
"a
(defun foo (foo bar foo)
\"foo bar foobar\" nil)
-(defun bar (bar foo bar)
+ (defun bar (bar foo bar)
\"bar foo barfoo\" nil)"
(lambda ()
(iedit-mode)
@@ -595,6 +595,28 @@ abcd"
"12345678901234567890123456789012345678901234567890...")))
(dolist (test iedit-printable-test-lists)
(should (string= (iedit-printable (car test)) (cadr test)))))
+(ert-deftest iedit-hide-unmatched-lines-test ()
+ "Test function iedit-hide-unmatched-lines."
+ (with-iedit-test-fixture
+ "foo
+a
+ foo
+a
+a
+barfoo
+a
+a
+a
+a
+ foo"
+ (lambda ()
+ (should (equal (iedit-hide-unmatched-lines 0) nil))
+ (iedit-show-all)
+ (should (equal (iedit-hide-unmatched-lines 1) '((14 29))))
+ (iedit-show-all)
+ (should (equal (iedit-hide-unmatched-lines 2) '((6 8))))
+ (iedit-show-all)
+ (should (equal (iedit-hide-unmatched-lines 3) nil)))))
;; (elp-instrument-list '(;; insert-and-inherit
;; ;; delete-region
- [nongnu] elpa/iedit 048d8417cf 202/301: *** empty log message ***, (continued)
- [nongnu] elpa/iedit 048d8417cf 202/301: *** empty log message ***, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit a8ab03848d 158/301: complete iedit-toggle-selection, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c0d108da3b 166/301: make the occurrence the latest kill in the kill ring, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit d89ee51834 148/301: Merge branch 'redo-prs' of github.com:lewang/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit fd801e77df 165/301: Merge pull request #38 from mgalgs/narrow-around-current-line, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 52c4865e5b 197/301: Add special prefix argument 1, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 8d20094a11 182/301: Use the original case in the iedit-replace default value, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 1242c675d2 164/301: Add save-window-excursion, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit b5a3415b00 180/301: Merge pull request #47 from zhenya1007/help-char-can-be-meta, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 6019d3c376 170/301: defvar iedit-current-symbol, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 22f4729ae9 150/301: Add test case for iedit-hide-unmatched-lines,
ELPA Syncer <=
- [nongnu] elpa/iedit 4884f61a3b 188/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 607e82c7b0 208/301: rename `iedit-current-symbol` to `iedit-default-occurrence`, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 1eabaa061a 210/301: Merge branch 'master' of github.com:victorhge/iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit a6d8568379 161/301: Merge pull request #35 from lewang/ensure-skip-mofication-once, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 54b2495af7 214/301: More default occurrence types, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 5b0b618a20 219/301: Quit iedit-mode in `before-revert-hook', ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 7a6a0d65ab 252/301: Replace deprecated cl with cl-lib, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit c1b672cfc9 270/301: Fix bug #115. Now properly disable iedit-mode during desktop restore., ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 76ff4aa6b9 218/301: Merge pull request #64 from justbur/sgml-error, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 2221a517a8 227/301: Fix comments, ELPA Syncer, 2022/01/10