diff options
| author | Vincent Belaïche | 2023-12-29 12:29:20 +0100 |
|---|---|---|
| committer | Vincent Belaïche | 2023-12-29 12:41:54 +0100 |
| commit | b96087d42714ebd4cbf610fc01eebc4f2adae5f7 (patch) | |
| tree | 409d51e78a218812e47d8fcdeb8a57818cf1db5a | |
| parent | 0ffcfd015d383e4f04ea41af7ac480a27c6f5da5 (diff) | |
| download | emacs-b96087d42714ebd4cbf610fc01eebc4f2adae5f7.tar.gz emacs-b96087d42714ebd4cbf610fc01eebc4f2adae5f7.zip | |
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.
| -rw-r--r-- | test/lisp/ses-tests.el | 21 |
1 files 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 @@ | |||
| 1 | ;;; ses-tests.el --- Tests for ses.el -*- lexical-binding: t; -*- | 1 | ;;; SES-tests.el --- Tests for ses.el -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2015-2023 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2015-2023 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -243,11 +243,10 @@ to `ses--bar' and inserting a row, makes A2 value empty, and `ses--bar' equal to | |||
| 243 | 243 | ||
| 244 | (ert-deftest ses-bug5852 () | 244 | (ert-deftest ses-bug5852 () |
| 245 | "This this bug is not yet fixed, the test is expected to fail. | 245 | "This this bug is not yet fixed, the test is expected to fail. |
| 246 | The bug is that after the second yank of the same formula the | 246 | The bug is that after modifying formula of B4 reference list of |
| 247 | reference list of cell B2 is correct in the memory data | 247 | cell B2 is correct in the memory data structure, but not in the |
| 248 | structure, but not in the written ses-cell macros in the data | 248 | written ses-cell macros in the data area, this is why the second |
| 249 | area, this is why the second should statement fails after | 249 | `should' statement fails after reloading the sheet." |
| 250 | reloading the sheet." | ||
| 251 | :expected-result :failed | 250 | :expected-result :failed |
| 252 | (let ((ses-initial-size '(4 . 3)) | 251 | (let ((ses-initial-size '(4 . 3)) |
| 253 | ses-after-entry-functions beg) | 252 | ses-after-entry-functions beg) |
| @@ -259,15 +258,9 @@ reloading the sheet." | |||
| 259 | (3 0 3) (3 1 (+ B2 A4))));A4 B4 | 258 | (3 0 3) (3 1 (+ B2 A4))));A4 B4 |
| 260 | (apply 'ses-cell-set-formula c) | 259 | (apply 'ses-cell-set-formula c) |
| 261 | (apply 'ses-calculate-cell (list (car c) (cadr c) nil))) | 260 | (apply 'ses-calculate-cell (list (car c) (cadr c) nil))) |
| 262 | (ses-jump 'B2) | 261 | (ses-cell-set-formula 2 1 '(+ B2 A3)); B3 |
| 263 | (setq beg (point)) | ||
| 264 | (ses-jump 'C2) | ||
| 265 | (kill-ring-save beg (point)) | ||
| 266 | (ses-jump 'B3) | ||
| 267 | (yank) | ||
| 268 | (ses-command-hook) | 262 | (ses-command-hook) |
| 269 | (ses-jump 'B4) | 263 | (ses-cell-set-formula 3 1 (+ B3 A4)); B4 |
| 270 | (yank) | ||
| 271 | (ses-command-hook) | 264 | (ses-command-hook) |
| 272 | (should (equal (ses-cell-references 1 1) '(B3))) | 265 | (should (equal (ses-cell-references 1 1) '(B3))) |
| 273 | (ses-mode) | 266 | (ses-mode) |