فهرست منبع

testing/lisp/test-org: actually check that org-open-at-point did the right thing

* testing/lisp/test-org.el (test-org/open-at-point): The test should
  leave the cursor one line above "Org Mode Manual" in the "*info*"
  buffer.  Try to switch to that buffer and check that point is where
  it should be, then kill the buffer.
Achim Gratz 11 سال پیش
والد
کامیت
8e72c8fcfa
1فایلهای تغییر یافته به همراه8 افزوده شده و 3 حذف شده
  1. 8 3
      testing/lisp/test-org.el

+ 8 - 3
testing/lisp/test-org.el

@@ -1017,12 +1017,17 @@ drops support for Emacs 24.1 and 24.2."
 
 (ert-deftest test-org/open-at-point ()
   "Test `org-open-at-point' with link being a heading property."
-  (org-test-with-temp-text
-      "* Headline
+  (should
+    (org-test-with-temp-text
+	"* Headline
 :PROPERTIES:
 :URL: <point>[[info:org#Top]]
 :END:"
-    (org-open-at-point)))
+      (org-open-at-point)
+      (and (switch-to-buffer "*info*")
+	   (prog1
+	       (looking-at "\nOrg Mode Manual")
+	     (kill-buffer))))))