diff options
| author | Vincent Belaïche | 2023-12-28 19:08:46 +0100 |
|---|---|---|
| committer | Vincent Belaïche | 2023-12-29 12:41:54 +0100 |
| commit | 0ffcfd015d383e4f04ea41af7ac480a27c6f5da5 (patch) | |
| tree | ec287f51e71e78fbd403c43a60734baafae5d898 /test | |
| parent | ae9657e1f4a01552d5ab1602fffa817f1fe2e56c (diff) | |
| download | emacs-0ffcfd015d383e4f04ea41af7ac480a27c6f5da5.tar.gz emacs-0ffcfd015d383e4f04ea41af7ac480a27c6f5da5.zip | |
Add test reproducting bug #5852
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/ses-tests.el | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/lisp/ses-tests.el b/test/lisp/ses-tests.el index a941605a4d8..3cc48f8a34d 100644 --- a/test/lisp/ses-tests.el +++ b/test/lisp/ses-tests.el | |||
| @@ -241,6 +241,38 @@ to `ses--bar' and inserting a row, makes A2 value empty, and `ses--bar' equal to | |||
| 241 | (ses-command-hook) | 241 | (ses-command-hook) |
| 242 | (should (eq (ses--cell-at-pos (point)) 'ses--toto))))) | 242 | (should (eq (ses--cell-at-pos (point)) 'ses--toto))))) |
| 243 | 243 | ||
| 244 | (ert-deftest ses-bug5852 () | ||
| 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 | ||
| 247 | reference list of cell B2 is correct in the memory data | ||
| 248 | structure, but not in the written ses-cell macros in the data | ||
| 249 | area, this is why the second should statement fails after | ||
| 250 | reloading the sheet." | ||
| 251 | :expected-result :failed | ||
| 252 | (let ((ses-initial-size '(4 . 3)) | ||
| 253 | ses-after-entry-functions beg) | ||
| 254 | (with-temp-buffer | ||
| 255 | (ses-mode) | ||
| 256 | (dolist (c '((0 1 1); B1 | ||
| 257 | (1 0 2) (1 1 (+ B1 A2)); A2 B2 | ||
| 258 | (2 0 4); A3 | ||
| 259 | (3 0 3) (3 1 (+ B2 A4))));A4 B4 | ||
| 260 | (apply 'ses-cell-set-formula c) | ||
| 261 | (apply 'ses-calculate-cell (list (car c) (cadr c) nil))) | ||
| 262 | (ses-jump 'B2) | ||
| 263 | (setq beg (point)) | ||
| 264 | (ses-jump 'C2) | ||
| 265 | (kill-ring-save beg (point)) | ||
| 266 | (ses-jump 'B3) | ||
| 267 | (yank) | ||
| 268 | (ses-command-hook) | ||
| 269 | (ses-jump 'B4) | ||
| 270 | (yank) | ||
| 271 | (ses-command-hook) | ||
| 272 | (should (equal (ses-cell-references 1 1) '(B3))) | ||
| 273 | (ses-mode) | ||
| 274 | (should (equal (ses-cell-references 1 1) '(B3)))))) | ||
| 275 | |||
| 244 | (provide 'ses-tests) | 276 | (provide 'ses-tests) |
| 245 | 277 | ||
| 246 | ;;; ses-tests.el ends here | 278 | ;;; ses-tests.el ends here |