commit abbe63d5f60de1fe82a04de080044da35ee37b8a
parent 7542eaab6dbcfaafb6fec2e70c22b486941b6e90
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date: Mon, 2 Nov 2015 09:05:58 +0530
Explicitly switch to test buffer when running tests
This ensures that things like isearch which expect the selected window
to be same as the window of the selected buffer continue to work in tests.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/emojify-tests.el b/emojify-tests.el
@@ -50,7 +50,8 @@ Helps isolate tests from each other's customizations."
;; Run tests in a new buffer
`(let ((test-buffer (get-buffer-create " *emojify-test-buffer*")))
(unwind-protect
- (with-current-buffer test-buffer
+ (save-window-excursion
+ (switch-to-buffer test-buffer)
;; Rename it uniquely so that subsequent buffers do not conflict with it
(rename-uniquely)
;; Save all possible customizations