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.
This commit is contained in:
Bastien Guerry 2012-12-15 08:04:43 +01:00
parent 8f3b8ee44c
commit c0675b478e
1 changed files with 8 additions and 8 deletions

View File

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