getting undo failure diagnostic in gha

This commit is contained in:
dickmao 2020-03-14 12:05:29 -04:00
parent a0943af912
commit d7a19d9859
3 changed files with 9 additions and 2 deletions

View file

@ -297,6 +297,12 @@
(When "I call \"ein:notebooklist-login\"")
(And "I wait for the smoke to clear")))))))
(When "^dump diagnostic"
(lambda ()
(let ((fill (- (length buffer-undo-list) (length ein:%which-cell%))))
(message "Undo failure diagnostic %s %s | %s"
buffer-undo-list ein:%which-cell% fill))))
(When "^eval \"\\(.*\\)\"$"
(lambda (command)
(eval (car (read-from-string command)))))

View file

@ -251,6 +251,7 @@ Scenario: Execute all cells, mod some cells, get outputs, undo mods
And I undo again
Then the cursor should be at point "139"
And I undo again
And dump diagnostic
Then the cursor should be at point "125"
@undo

View file

@ -57,10 +57,10 @@
(ein:deflocal buffer-local-enable-undo t
"Buffer local variable activating undo accounting. Should not modify.")
(ein:deflocal ein:%cell-lengths% '()
(ein:deflocal ein:%cell-lengths% nil
"Buffer local variable with buffer-undo-list's current knowledge of cell lengths.")
(ein:deflocal ein:%which-cell% '()
(ein:deflocal ein:%which-cell% nil
"Buffer local variable one-to-one buffer-undo-list item to cell id.")
(defsubst ein:worksheet--unique-enough-cell-id (cell)