Fix failing test
* testing/lisp/test-ox-publish.el (test-org-publish/resolve-external-link): Rewrite test to prevent race condition which could affect results. * testing/examples/pub/b.org: Add missing keyword.
This commit is contained in:
parent
902bfe1892
commit
ee3a9e9a77
|
@ -2,5 +2,8 @@
|
||||||
#+date: <2012-03-29 Thu>
|
#+date: <2012-03-29 Thu>
|
||||||
|
|
||||||
* Headline1
|
* Headline1
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: b1
|
||||||
|
:END:
|
||||||
|
|
||||||
[[file:a.org::#a1]]
|
[[file:a.org::#a1]]
|
||||||
|
|
|
@ -366,27 +366,29 @@ Unless set otherwise in PROPERTIES, `:base-directory' is set to
|
||||||
;; instead of internal reference, whenever possible.
|
;; instead of internal reference, whenever possible.
|
||||||
(should
|
(should
|
||||||
(equal
|
(equal
|
||||||
"a1"
|
'("a1" "b1")
|
||||||
(let* ((ids nil)
|
(let* ((ids nil)
|
||||||
|
(link-transcoder
|
||||||
|
(lambda (l c i)
|
||||||
|
(let ((option (org-element-property :search-option l))
|
||||||
|
(path (org-element-property :path l)))
|
||||||
|
(push (org-publish-resolve-external-link option path t)
|
||||||
|
ids)
|
||||||
|
"")))
|
||||||
(backend
|
(backend
|
||||||
(org-export-create-backend
|
(org-export-create-backend
|
||||||
:transcoders
|
:transcoders `((headline . (lambda (h c i) c))
|
||||||
'((headline . (lambda (h c i) c))
|
(paragraph . (lambda (p c i) c))
|
||||||
(paragraph . (lambda (p c i) c))
|
(section . (lambda (s c i) c))
|
||||||
(section . (lambda (s c i) c))
|
(link . ,link-transcoder))))
|
||||||
(link . (lambda (l c i)
|
|
||||||
(let ((option (org-element-property :search-option l))
|
|
||||||
(path (org-element-property :path l)))
|
|
||||||
(when option
|
|
||||||
(throw :exit (org-publish-resolve-external-link
|
|
||||||
option path t)))))))))
|
|
||||||
(publish
|
(publish
|
||||||
(lambda (plist filename pub-dir)
|
(lambda (plist filename pub-dir)
|
||||||
(push (catch :exit
|
(org-publish-org-to backend filename ".test" plist pub-dir))))
|
||||||
(org-publish-org-to backend filename ".test" plist pub-dir))
|
(org-test-publish (list :publishing-function (list publish)
|
||||||
ids))))
|
:exclude "."
|
||||||
(org-test-publish (list :publishing-function (list publish)) #'ignore)
|
:include '("a.org" "b.org"))
|
||||||
(car ids)))))
|
#'ignore)
|
||||||
|
(sort ids #'string<)))))
|
||||||
|
|
||||||
|
|
||||||
;;; Tools
|
;;; Tools
|
||||||
|
|
Loading…
Reference in New Issue