|
@@ -29,13 +29,12 @@
|
|
"Editing regular block works, with point on source block."
|
|
"Editing regular block works, with point on source block."
|
|
(org-test-with-temp-text
|
|
(org-test-with-temp-text
|
|
"
|
|
"
|
|
-#+begin_src emacs-lisp
|
|
|
|
|
|
+<point>#+begin_src emacs-lisp
|
|
(message hello)
|
|
(message hello)
|
|
#+end_src
|
|
#+end_src
|
|
"
|
|
"
|
|
(let ((org-edit-src-content-indentation 2)
|
|
(let ((org-edit-src-content-indentation 2)
|
|
(org-src-preserve-indentation nil))
|
|
(org-src-preserve-indentation nil))
|
|
- (goto-line 2)
|
|
|
|
(org-edit-special)
|
|
(org-edit-special)
|
|
(insert "blah")
|
|
(insert "blah")
|
|
(org-edit-src-exit)
|
|
(org-edit-src-exit)
|
|
@@ -44,7 +43,7 @@
|
|
blah(message hello)
|
|
blah(message hello)
|
|
#+end_src
|
|
#+end_src
|
|
"))
|
|
"))
|
|
- (should (equal (word-at-point) "blah")))))
|
|
|
|
|
|
+ (should (org-looking-at-p "(message hello)")))))
|
|
|
|
|
|
(ert-deftest test-org-src/point-outside-block ()
|
|
(ert-deftest test-org-src/point-outside-block ()
|
|
"Editing with point before/after block signals expected error."
|
|
"Editing with point before/after block signals expected error."
|
|
@@ -63,21 +62,21 @@
|
|
"Editing empty block."
|
|
"Editing empty block."
|
|
(org-test-with-temp-text
|
|
(org-test-with-temp-text
|
|
"
|
|
"
|
|
-#+begin_src emacs-lisp
|
|
|
|
|
|
+<point>#+begin_src emacs-lisp
|
|
#+end_src
|
|
#+end_src
|
|
"
|
|
"
|
|
- (let ((org-edit-src-content-indentation 2)
|
|
|
|
|
|
+ (let ((org-edit-src-content-indentation 0)
|
|
(org-src-preserve-indentation nil))
|
|
(org-src-preserve-indentation nil))
|
|
- (goto-line 2)
|
|
|
|
(org-edit-special)
|
|
(org-edit-special)
|
|
(insert "blah")
|
|
(insert "blah")
|
|
(org-edit-src-exit)
|
|
(org-edit-src-exit)
|
|
(should (equal (buffer-string) "
|
|
(should (equal (buffer-string) "
|
|
#+begin_src emacs-lisp
|
|
#+begin_src emacs-lisp
|
|
- blah
|
|
|
|
|
|
+blah
|
|
#+end_src
|
|
#+end_src
|
|
"))
|
|
"))
|
|
- (should (equal (word-at-point) "blah")))))
|
|
|
|
|
|
+ (should
|
|
|
|
+ (equal (buffer-substring (line-beginning-position) (point)) "blah")))))
|
|
|
|
|
|
(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."
|