emacs-diffs
[Top][All Lists]
Advanced

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

master b96087d4271 2/3: Simplify test ses-bug5852


From: Vincent Belaïche
Subject: master b96087d4271 2/3: Simplify test ses-bug5852
Date: Fri, 29 Dec 2023 06:42:05 -0500 (EST)

branch: master
commit b96087d42714ebd4cbf610fc01eebc4f2adae5f7
Author: Vincent Belaïche <vincentb1@users.sourceforge.net>
Commit: Vincent Belaïche <vincentb1@users.sourceforge.net>

    Simplify test ses-bug5852
    
    * test/lisp/ses-tests.el (ses-bug5852): Siumplify test to
    demonstrate that the bug is not connected to yanking, but has to
    do with ses-cell-set-formula.
---
 test/lisp/ses-tests.el | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/test/lisp/ses-tests.el b/test/lisp/ses-tests.el
index 3cc48f8a34d..9983ec0d09f 100644
--- a/test/lisp/ses-tests.el
+++ b/test/lisp/ses-tests.el
@@ -1,4 +1,4 @@
-;;; ses-tests.el --- Tests for ses.el              -*- lexical-binding: t; -*-
+;;; SES-tests.el --- Tests for ses.el              -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
 
@@ -243,11 +243,10 @@ to `ses--bar' and inserting a row, makes A2 value empty, 
and `ses--bar' equal to
 
 (ert-deftest ses-bug5852 ()
   "This this bug is not yet fixed, the test is expected to fail.
-The bug is that after the second yank of the same formula the
-reference list of cell B2 is correct in the memory data
-structure, but not in the written ses-cell macros in the data
-area, this is why the second should statement fails after
-reloading the sheet."
+The bug is that after modifying formula of B4 reference list of
+cell B2 is correct in the memory data structure, but not in the
+written ses-cell macros in the data area, this is why the second
+`should' statement fails after reloading the sheet."
   :expected-result :failed
   (let ((ses-initial-size '(4 . 3))
         ses-after-entry-functions beg)
@@ -259,15 +258,9 @@ reloading the sheet."
                    (3 0 3) (3 1 (+ B2 A4))));A4 B4
         (apply 'ses-cell-set-formula c)
         (apply 'ses-calculate-cell (list (car c) (cadr c) nil)))
-      (ses-jump 'B2)
-      (setq beg (point))
-      (ses-jump 'C2)
-      (kill-ring-save beg (point))
-      (ses-jump 'B3)
-      (yank)
+      (ses-cell-set-formula 2 1 '(+ B2 A3)); B3
       (ses-command-hook)
-      (ses-jump 'B4)
-      (yank)
+      (ses-cell-set-formula 3 1 (+ B3 A4)); B4
       (ses-command-hook)
       (should (equal (ses-cell-references 1 1) '(B3)))
       (ses-mode)



reply via email to

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