aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test-lib.el
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2012-11-15 14:49:52 -0500
committerGravatar David Bremner <bremner@debian.org>2012-11-15 18:03:02 -0400
commit65801835ee47dc4cada82c8a3ae16e8177a7919a (patch)
tree9bd1671622b6691663d44903cdf19ad461355921 /test/test-lib.el
parentb173037398ae61ddc1017f94c8a63a71b1b4c3fc (diff)
test: Test buttonization of id: links
This matches the current behavior of the buttonizer, so it passes, but many of these cases are not what you'd want (and some of them aren't even valid Xapian queries). The next patch will fix the handling of these cases and update the test.
Diffstat (limited to 'test/test-lib.el')
-rw-r--r--test/test-lib.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test-lib.el b/test/test-lib.el
index fa3380cf..dece811e 100644
--- a/test/test-lib.el
+++ b/test/test-lib.el
@@ -107,6 +107,20 @@ nothing."
(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
+ (jit-lock-fontify-now)
+ (save-excursion
+ (let ((inhibit-read-only t))
+ (goto-char (point-min))
+ (let ((button))
+ (while (setq button (next-button (point)))
+ (goto-char (button-start button))
+ (insert "<<")
+ (goto-char (button-end button))
+ (insert ">>"))))))
+
(defmacro notmuch-test-run (&rest body)
"Evaluate a BODY of test expressions and output the result."
`(with-temp-buffer