diff options
| author | Daniel Pettersson <daniel@dpettersson.net> | 2024-04-15 23:23:03 +0200 |
|---|---|---|
| committer | Daniel Pettersson <daniel@dpettersson.net> | 2024-04-15 23:23:03 +0200 |
| commit | 729cfdd02477cacaf87cd96e875112758938853b (patch) | |
| tree | b63717a50a78e966a8533518b195a767bbda5172 /dape-tests.el | |
| parent | dae8d114008ba2bad507993cc045612982dc4658 (diff) | |
Fix watch buffer revert in tests
Diffstat (limited to 'dape-tests.el')
| -rw-r--r-- | dape-tests.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dape-tests.el b/dape-tests.el index a113374..3ef01a8 100644 --- a/dape-tests.el +++ b/dape-tests.el @@ -370,8 +370,8 @@ Expects line with string \"breakpoint\" in source." (equal (line-number-at-pos) (dape-test--line-at-regex "breakpoint")))) ;; contents of watch buffer - (with-current-buffer (dape-test--should - (dape--info-get-live-buffer 'dape-info-watch-mode)) + (with-current-buffer (dape--info-get-buffer-create 'dape-info-watch-mode) + (dape-test--revert-buffer) (dape-test--should (and (dape-test--line-at-regex "^ a") (dape-test--line-at-regex "^\\+ b"))) @@ -388,11 +388,13 @@ Expects line with string \"breakpoint\" in source." (dape-test--line-at-regex "^ a *0")) (cl-letf (((symbol-function 'read-string) (lambda (&rest _) "99"))) - (dape-test--apply-to-match "^ a" 'dape-info-variable-edit)) + (dape-test--apply-to-match "^ a *0" 'dape-info-variable-edit)) + (dape-test--revert-buffer) (dape-test--should (dape-test--line-at-regex "^ a *99")) ;; watch removal (dape-test--apply-to-match "^ a" 'dape-info-scope-watch-dwim) + (dape-test--revert-buffer) (dape-test--should (not (dape-test--line-at-regex "^ a")))))) |
