Преглед изворни кода

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))))))