summaryrefslogtreecommitdiff
path: root/dape-tests.el
diff options
context:
space:
mode:
authorDaniel Pettersson <daniel@dpettersson.net>2024-04-15 23:23:03 +0200
committerDaniel Pettersson <daniel@dpettersson.net>2024-04-15 23:23:03 +0200
commit729cfdd02477cacaf87cd96e875112758938853b (patch)
treeb63717a50a78e966a8533518b195a767bbda5172 /dape-tests.el
parentdae8d114008ba2bad507993cc045612982dc4658 (diff)
Fix watch buffer revert in tests
Diffstat (limited to 'dape-tests.el')
-rw-r--r--dape-tests.el8
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"))))))