test_expect_equal_file $EXPECTED/notmuch-search-tag-inbox OUTPUT
test_begin_subtest "Incremental parsing of search results"
-test_emacs "(ad-enable-advice 'notmuch-search-process-filter 'around 'pessimal)
- (ad-activate 'notmuch-search-process-filter)
- (notmuch-search \"tag:inbox\")
- (notmuch-test-wait)
- (ad-disable-advice 'notmuch-search-process-filter 'around 'pessimal)
- (ad-activate 'notmuch-search-process-filter)
+test_emacs "(cl-letf* (((symbol-function 'orig)
+ (symbol-function 'notmuch-search-process-filter))
+ ((symbol-function 'notmuch-search-process-filter)
+ (lambda (proc string)
+ (cl-loop for char across string
+ do (orig proc (char-to-string char))))))
+ (notmuch-search \"tag:inbox\")
+ (notmuch-test-wait))
(test-output)"
test_expect_equal_file $EXPECTED/notmuch-search-tag-inbox OUTPUT
(add-hook 'notmuch-hello-refresh-hook
(lambda () (cl-incf notmuch-hello-refresh-hook-counter)))
-(defadvice notmuch-search-process-filter (around pessimal activate disable)
- "Feed notmuch-search-process-filter one character at a time."
- (let ((string (ad-get-arg 1)))
- (cl-loop for char across string
- do (progn
- (ad-set-arg 1 (char-to-string char))
- ad-do-it))))
-
(defun notmuch-test-mark-links ()
"Enclose links in the current buffer with << and >>."
;; Links are often created by jit-lock functions