Explorar o código

test-org-src.el: Fix a test.

* lisp/test-org-src.el (test-org-src/blank-line-block): Use
`org-test-with-temp-text-in-file' because `org-in-src-block-p'
checks against an Org mode text property.  Don't check for the
word at point.

Thanks to Nick Dokos for reporting this failed test.
Bastien Guerry %!s(int64=12) %!d(string=hai) anos
pai
achega
c0675b478e
Modificáronse 1 ficheiros con 8 adicións e 8 borrados
  1. 8 8
      testing/lisp/test-org-src.el

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

@@ -80,22 +80,22 @@
 
 (ert-deftest test-org-src/blank-line-block ()
   "Editing block with just a blank line."
-  (org-test-with-temp-text
+  (org-test-with-temp-text-in-file
       "
 #+begin_src emacs-lisp
 
 #+end_src
 "
-    (goto-line 3)
-    (org-edit-special)
-    (insert "blah")
-    (org-edit-src-exit)
-    (should (equal (buffer-string) "
+    (progn
+      (goto-line 3)
+      (org-edit-special)
+      (insert "blah")
+      (org-edit-src-exit)
+      (should (equal (buffer-string) "
 #+begin_src emacs-lisp
   blah
 #+end_src
-"))
-    (should (equal (word-at-point) "blah"))))
+")))))
 
 (provide 'test-org-src)
 ;;; test-org-src.el ends here