branch: externals/hyperbole commit 72d93e55c56b07df3161fac99a1ef1929e656789 Merge: bc0c4f74af dc1e20b389 Author: Robert Weiner <r...@gnu.org> Commit: Robert Weiner <r...@gnu.org>
Merge Mats updates in branch 'master' of hyperbole --- ChangeLog | 7 +++++++ test/kotl-mode-tests.el | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/ChangeLog b/ChangeLog index bf7b847d10..1fe1d9c84e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +<<<<<<< HEAD 2022-01-22 Bob Weiner <r...@gnu.org> * hycontrol.el (hycontrol-windows-grid-by-file-pattern): Add this command that creates @@ -15,6 +16,12 @@ HY-NEWS: Add Koutlines 0 cell attribute handling description. man/hyperbole.texi (Cell Attributes): Document above change. +2022-01-22 Mats Lidell <ma...@gnu.org> + +* test/kotl-mode-tests.el + (kotl-mode-copy-kotl-file-updates-root-id-attributes): Verify that + root cell attribute for file name is updated. + 2022-01-21 Bob Weiner <r...@gnu.org> * kotl/kotl-mode.el (kotl-mode:cell-attributes): Assume parent has set stdout diff --git a/test/kotl-mode-tests.el b/test/kotl-mode-tests.el index d1d71d8c5f..2f3c2a45bc 100644 --- a/test/kotl-mode-tests.el +++ b/test/kotl-mode-tests.el @@ -463,5 +463,23 @@ (should (looking-at-p "first"))) (delete-file kotl-file)))) +(ert-deftest kotl-mode-copy-kotl-file-updates-root-id-attributes () + "Verify root id-attribute is updated when kotl mode is copied." + (let ((kotl-file (make-temp-file "hypb" nil ".kotl")) + (new-name (concat (make-temp-name (concat temporary-file-directory "hypb")) ".kotl"))) + (unwind-protect + (progn + (find-file kotl-file) + (insert "a cell") + (save-buffer) + (should (string= (kcell:get-attr (kcell-view:cell-from-ref 0) 'file) kotl-file)) + + (copy-file kotl-file new-name) + (find-file new-name) + (should (string= (kcell:get-attr (kcell-view:cell-from-ref 0) 'file) new-name))) + (progn + (delete-file kotl-file) + (delete-file new-name))))) + (provide 'kotl-mode-tests) ;;; kotl-mode-tests.el ends here