[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/lentic 8ab992a0d0 113/333: Added a test to bug with org
From: |
ELPA Syncer |
Subject: |
[elpa] externals/lentic 8ab992a0d0 113/333: Added a test to bug with orgel->org mode. |
Date: |
Tue, 27 Feb 2024 13:00:14 -0500 (EST) |
branch: externals/lentic
commit 8ab992a0d0170788c79305bd21f8c07cc1244004
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>
Added a test to bug with orgel->org mode.
---
test/linked-buffer-test.el | 51 ++++++++++++++++++++++++++++++++++++++--------
1 file changed, 42 insertions(+), 9 deletions(-)
diff --git a/test/linked-buffer-test.el b/test/linked-buffer-test.el
index 5a45cb1e89..a7f3c240df 100644
--- a/test/linked-buffer-test.el
+++ b/test/linked-buffer-test.el
@@ -145,37 +145,53 @@
;; At the moment, this does not check that the changes are actually
;; incremental, cause that's harder.
(defun linked-buffer-test-clone-and-change-with-config
- (filename init f)
+ (filename init &optional f-this f-that retn-that)
"Clone file and make changes to check incremental updates.
Using INIT clone FILE, then apply F in the buffer, and return the
results."
;; most of this is the same as batch-clone..
- (let ((retn nil))
+ (let ((retn nil)
+ (f-this
+ (or f-this
+ (lambda ())))
+ (f-that
+ (or f-that
+ (lambda ()))))
(with-current-buffer
(find-file-noselect filename)
(setq linked-buffer-init init)
(let ((linked
(linked-buffer-init-create)))
- (funcall f)
+ (funcall f-this)
(with-current-buffer
linked
- (setq retn
- (buffer-substring-no-properties
- (point-min)
- (point-max)))
+ (funcall f-that)
+ (unless retn-that
+ (setq retn
+ (buffer-substring-no-properties
+ (point-min)
+ (point-max))))
(set-buffer-modified-p nil)
(kill-buffer)))
+ (when retn-that
+ (setq retn
+ (buffer-substring-no-properties
+ (point-min)
+ (point-max))))
(set-buffer-modified-p nil)
(kill-buffer))
retn))
-(defun linked-buffer-test-clone-and-change-equal (init file cloned-file f)
+(defun linked-buffer-test-clone-and-change-equal
+ (init file cloned-file
+ &optional f-this f-that retn-that)
(let ((cloned-file
(f-read
(linked-buffer-test-file cloned-file)))
(cloned-results
(linked-buffer-test-clone-and-change-with-config
- (linked-buffer-test-file file) init f)))
+ (linked-buffer-test-file file) init f-this f-that
+ retn-that)))
(if
(string= cloned-file cloned-results)
t
@@ -272,3 +288,20 @@ This mostly checks my test machinary."
(delete-char 1)
(insert ";")
(insert ";")))))
+
+(ert-deftest orgel-org-incremental ()
+ (should
+ (linked-buffer-test-clone-and-change-equal
+ 'linked-buffer-orgel-org-init
+ "orgel-org.el" "orgel-org.el"
+ nil
+ (lambda ()
+ (goto-char (point-min))
+ (forward-line)
+ (insert "a")
+ (delete-char -1))
+ t)))
+
+
+
+
- [elpa] externals/lentic 191e7b3c66 080/333: Initial incorporation of incremental change., (continued)
- [elpa] externals/lentic 191e7b3c66 080/333: Initial incorporation of incremental change., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e3032a6ebc 067/333: v0.5 release, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic a188840402 090/333: Incremental updates for block mode., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 475d8e14ba 071/333: Case sensitivity an option for blocks., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic e195259aac 076/333: linked-buffer-org documentation completed., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic bf5a5cfbf1 085/333: Add long test file., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 070c94118e 074/333: Added .dir-locals, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 08cb364e4c 094/333: Nil markers after use., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 449c4d0bc1 098/333: Pass start and end through., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 10c91c51d5 110/333: Specialised beginning of line treatment., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 8ab992a0d0 113/333: Added a test to bug with orgel->org mode.,
ELPA Syncer <=
- [elpa] externals/lentic 48d809a4af 115/333: Use unwind-protect in test forms., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic abcdc7f422 117/333: m-buffer-with-markers used., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 934c7bc313 118/333: Fixes for incremental updates., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 779c2d05e3 120/333: Treat start of line properly in blocks., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 30d9141686 121/333: m-buffer update -- move to stable., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic a740327d41 126/333: More efficient detection of first line., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 37eb0a74cd 128/333: More Emacs versions added., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 6ce64ab475 131/333: Test only two versions!, ELPA Syncer, 2024/02/27
- [elpa] externals/lentic 7e39bf724c 134/333: Incorporate new functions from m-buffer., ELPA Syncer, 2024/02/27
- [elpa] externals/lentic b71b478f51 139/333: Test expected to fail., ELPA Syncer, 2024/02/27