emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hyperbole 79a5800: Add test for split-cell (#122)


From: ELPA Syncer
Subject: [elpa] externals/hyperbole 79a5800: Add test for split-cell (#122)
Date: Sun, 26 Sep 2021 14:57:14 -0400 (EDT)

branch: externals/hyperbole
commit 79a58008e28ba658ae210310409a712174edb21c
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>

    Add test for split-cell (#122)
    
    * Add test for split-cell
    
    * Create a new plist for the new cell from the split
---
 ChangeLog               |  6 ++++++
 kotl/kotl-mode.el       |  2 +-
 test/kotl-mode-tests.el | 15 +++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index ab053be..6e1b22b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,12 @@
 * Makefile (bin-warn): Control what warning messages to get when byte
     compiling.
 
+2021-09-18  Mats Lidell  <matsl@gnu.org>
+
+* kotl/kotl-mode.el (kotl-mode:split-cell): Create new plist for split cell.
+
+* test/kotl-mode-tests.el (kotl-mode-split-cell): Add test for split-cell
+
 2021-09-14  Mats Lidell  <matsl@gnu.org>
 
 * hbut.el (defib, defil, defal): Use declare notation for making macros
diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el
index 8bdd988..22ce277 100644
--- a/kotl/kotl-mode.el
+++ b/kotl/kotl-mode.el
@@ -2545,7 +2545,7 @@ the current cell."
     ;; delete any preceding whitespace
     (skip-chars-backward " \t\n\r" start)
     (delete-region (max start (point)) (kcell-view:end-contents))
-    (kotl-mode:add-cell arg new-cell-contents (kcell-view:plist))))
+    (kotl-mode:add-cell arg new-cell-contents)))
 
 (defun kotl-mode:transpose-cells (arg)
   "Exchange current and previous visible cells, leaving point after both.
diff --git a/test/kotl-mode-tests.el b/test/kotl-mode-tests.el
index 9b4b0f6..b906b75 100644
--- a/test/kotl-mode-tests.el
+++ b/test/kotl-mode-tests.el
@@ -307,6 +307,21 @@
           (should (looking-at-p "$")))
       (delete-file kotl-file))))
 
+(ert-deftest kotl-mode-split-cell ()
+  "Kotl-mode split cell."
+  (let ((kotl-file (make-temp-file "hypb" nil ".kotl")))
+    (unwind-protect
+        (progn
+          (find-file kotl-file)
+          (insert "firstsecond\n")
+          (backward-char 7)
+          (kotl-mode:split-cell)
+          (should (string= (kcell-view:label (point)) "2"))
+          (kotl-mode:demote-tree 0)
+          (should (string= (kcell-view:label (point)) "1a"))
+          (should (string= (kcell-view:idstamp) "02")))
+      (delete-file kotl-file))))
+
 (provide 'kotl-mode-tests)
 ;;; kotl-mode-tests.el ends here
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]