Merge branch 'maint'

This commit is contained in:
Bastien Guerry 2012-09-29 09:39:22 +02:00
commit 33ab30ca2a
3 changed files with 25 additions and 15 deletions

View File

@ -718,10 +718,12 @@ Assume point is at beginning of the headline."
(raw-value (or (nth 4 components) ""))
(quotedp
(let ((case-fold-search nil))
(string-match (format "^%s +" org-quote-string) raw-value)))
(string-match (format "^%s\\( \\|$\\)" org-quote-string)
raw-value)))
(commentedp
(let ((case-fold-search nil))
(string-match (format "^%s +" org-comment-string) raw-value)))
(string-match (format "^%s\\( \\|$\\)" org-comment-string)
raw-value)))
(archivedp (member org-archive-tag tags))
(footnote-section-p (and org-footnote-section
(string= org-footnote-section raw-value)))

View File

@ -692,7 +692,7 @@ on two lines
(forward-line)
(should
(string=
""
""
(buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
(org-test-with-temp-text-in-file "
#+begin_src emacs-lisp
@ -706,7 +706,7 @@ on two lines
(forward-line)
(should
(string=
": some text"
": some text"
(buffer-substring-no-properties (point-at-bol) (point-at-eol)))))))
(ert-deftest test-ob/commented-last-block-line-with-var ()
@ -720,7 +720,7 @@ on two lines
(re-search-forward "\\#\\+results:" nil t)
(forward-line)
(should (string=
""
""
(buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
(org-test-with-temp-text-in-file "
#+begin_src emacs-lisp :var a=2
@ -732,7 +732,7 @@ on two lines
(re-search-forward "\\#\\+results:" nil t)
(forward-line)
(should (string=
": 2"
": 2"
(buffer-substring-no-properties (point-at-bol) (point-at-eol)))))))
(defun test-ob-verify-result-and-removed-result (result buffer-text)
@ -748,7 +748,7 @@ replacement happens correctly."
(org-babel-next-src-block) (org-ctrl-c-ctrl-c) (org-ctrl-c-ctrl-c)
(should (re-search-forward "\\#\\+results:" nil t))
(forward-line)
(should (string= result
(should (string= result
(buffer-substring-no-properties
(point-at-bol)
(- (point-max) 16))))
@ -846,7 +846,7 @@ trying to find the :END: marker."
(re-search-forward "\\#\\+results:" nil t)
(forward-line)
(should (string=
""
""
(buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
(org-test-with-temp-text-in-file "
#+begin_src emacs-lisp :var a=2
@ -858,7 +858,7 @@ trying to find the :END: marker."
(re-search-forward "\\#\\+results:" nil t)
(forward-line)
(should (string=
": 2"
": 2"
(buffer-substring-no-properties (point-at-bol) (point-at-eol)))))))
(defun test-ob-verify-result-and-removed-result (result buffer-text)
@ -874,7 +874,7 @@ replacement happens correctly."
(org-babel-next-src-block) (org-ctrl-c-ctrl-c) (org-ctrl-c-ctrl-c)
(should (re-search-forward "\\#\\+results:" nil t))
(forward-line)
(should (string= result
(should (string= result
(buffer-substring-no-properties
(point-at-bol)
(- (point-max) 16))))
@ -930,9 +930,9 @@ hello there
"Test `org-babel-remove-result' with :results org."
(test-ob-verify-result-and-removed-result
"#+BEGIN_SRC org
* heading
** subheading
content
,* heading
,** subheading
,content
#+END_SRC"
"* org-babel-remove-result
@ -1007,11 +1007,11 @@ Line 3\"
(org-test-with-temp-text "Block two has a space after the name.
#+name: foo
#+begin_src emacs-lisp
#+begin_src emacs-lisp
1
#+end_src emacs-lisp
#+name: foo
#+name: foo
#+begin_src emacs-lisp
2
#+end_src

View File

@ -751,6 +751,10 @@ CLOCK: [2012-01-01 sun. 00:01]--[2012-01-01 sun. 00:02] => 0:01"
(org-test-with-temp-text "* TODO QUOTE Headline"
(let ((org-quote-string "QUOTE")
(org-todo-keywords '((sequence "TODO" "DONE"))))
(should (org-element-property :quotedp (org-element-at-point)))))
;; With the keyword only.
(org-test-with-temp-text "* QUOTE"
(let ((org-quote-string "QUOTE"))
(should (org-element-property :quotedp (org-element-at-point))))))
(ert-deftest test-org-element/headline-comment-keyword ()
@ -773,6 +777,10 @@ CLOCK: [2012-01-01 sun. 00:01]--[2012-01-01 sun. 00:02] => 0:01"
(org-test-with-temp-text "* TODO COMMENT Headline"
(let ((org-comment-string "COMMENT")
(org-todo-keywords '((sequence "TODO" "DONE"))))
(should (org-element-property :commentedp (org-element-at-point)))))
;; With the keyword only.
(org-test-with-temp-text "* COMMENT"
(let ((org-comment-string "COMMENT"))
(should (org-element-property :commentedp (org-element-at-point))))))
(ert-deftest test-org-element/headline-archive-tag ()