From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: FIX missing case-folding in test-ob-emacs-lisp.el
Date: Tue, 12 Mar 2013 16:45:26 +0100 [thread overview]
Message-ID: <513F4D96.6000702@easy-emacs.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 28208 bytes --]
Running tests from org-mode/testing/README failed due to missing case-folding
Downcased "result" was searched while upcased was inserted
Patch attached
Error was:
Debugger entered--Lisp error: (ert-test-failed ((should (string= #1=": 2" (buffer-substring-no-properties (point-at-bol) (point-at-eol)))) :form (string= #1# "2;;") :value
nil))
signal(ert-test-failed (((should (string= #1=": 2" (buffer-substring-no-properties (point-at-bol) (point-at-eol)))) :form (string= #1# "2;;") :value nil)))
ert-fail(((should (string= #1=": 2" (buffer-substring-no-properties (point-at-bol) (point-at-eol)))) :form (string= #1# "2;;") :value nil))
(if (unwind-protect (setq value-76 (apply fn-74 args-75)) (setq form-description-78 (nconc (list (quote (should (string= ": 2" ...)))) (list :form (cons fn-74 args-75))
(if (eql value-76 (quote ert-form-evaluation-aborted-77)) nil (list :value value-76)) (let ((-explainer- (and ... ...))) (if -explainer- (progn (list :explanation ...))))))
(ert--signal-should-execution form-description-78)) nil (ert-fail form-description-78))
(let (form-description-78) (if (unwind-protect (setq value-76 (apply fn-74 args-75)) (setq form-description-78 (nconc (list (quote (should ...))) (list :form (cons fn-74
args-75)) (if (eql value-76 (quote ert-form-evaluation-aborted-77)) nil (list :value value-76)) (let ((-explainer- ...)) (if -explainer- (progn ...)))))
(ert--signal-should-execution form-description-78)) nil (ert-fail form-description-78)))
(let ((value-76 (quote ert-form-evaluation-aborted-77))) (let (form-description-78) (if (unwind-protect (setq value-76 (apply fn-74 args-75)) (setq form-description-78
(nconc (list (quote ...)) (list :form (cons fn-74 args-75)) (if (eql value-76 ...) nil (list :value value-76)) (let (...) (if -explainer- ...))))
(ert--signal-should-execution form-description-78)) nil (ert-fail form-description-78))) value-76)
(let ((fn-74 (function string=)) (args-75 (list . #1=(": 2" (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))) (let ((value-76 (quote
ert-form-evaluation-aborted-77))) (let (form-description-78) (if (unwind-protect (setq value-76 (apply fn-74 args-75)) (setq form-description-78 (nconc (list ...) (list
:form ...) (if ... nil ...) (let ... ...))) (ert--signal-should-execution form-description-78)) nil (ert-fail form-description-78))) value-76))
(progn (org-babel-next-src-block) (org-ctrl-c-ctrl-c) (re-search-forward "results" nil t) (forward-line) (let ((fn-74 (function string=)) (args-75 (list . #1=(": 2"
(buffer-substring-no-properties (point-at-bol) (point-at-eol)))))) (let ((value-76 (quote ert-form-evaluation-aborted-77))) (let (form-description-78) (if (unwind-protect
(setq value-76 (apply fn-74 args-75)) (setq form-description-78 (nconc ... ... ... ...)) (ert--signal-should-execution form-description-78)) nil (ert-fail
form-description-78))) value-76)))
(setq G39143 (progn (org-babel-next-src-block) (org-ctrl-c-ctrl-c) (re-search-forward "results" nil t) (forward-line) (let ((fn-74 (function string=)) (args-75 (list .
#1=(": 2" (buffer-substring-no-properties ... ...))))) (let ((value-76 (quote ert-form-evaluation-aborted-77))) (let (form-description-78) (if (unwind-protect (setq
value-76 ...) (setq form-description-78 ...) (ert--signal-should-execution form-description-78)) nil (ert-fail form-description-78))) value-76))))
(let ((kill-buffer-query-functions nil) G39143) (let ((temp-file #1="/tmp/org-test634987c") (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*"))))
(unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert "\n#+begin_src emacs-lisp :var a=2\n2;;\n#+end_src")) (save-current-buffer (set-buffer
temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (find-file #1#) (org-mode) (setq G39143 (progn
(org-babel-next-src-block) (org-ctrl-c-ctrl-c) (re-search-forward "results" nil t) (forward-line) (let ((fn-74 (function string=)) (args-75 (list . #2=(": 2" ...)))) (let
((value-76 (quote ert-form-evaluation-aborted-77))) (let (form-description-78) (if (unwind-protect ... ... ...) nil (ert-fail form-description-78))) value-76))))
(save-buffer) (kill-buffer (current-buffer)) (delete-file #1#) G39143)
eval-buffer(#<buffer *load*> nil "MY-PATH/test-ob-emacs-lisp.el" nil t) ; Reading at buffer position 2235
(let ((load-file-name fullname) (set-auto-coding-for-load t) (inhibit-file-name-operation nil)) (save-current-buffer (set-buffer buffer) (set-buffer-multibyte t) (let
(deactivate-mark) (insert-file-contents fullname)) (if (and enable-multibyte-characters (or (eq (coding-system-type last-coding-system-used) (quote raw-text))))
(set-buffer-multibyte nil)) (set-buffer-modified-p nil)) (eval-buffer buffer nil (if purify-flag file fullname) nil t))
(unwind-protect (let ((load-file-name fullname) (set-auto-coding-for-load t) (inhibit-file-name-operation nil)) (save-current-buffer (set-buffer buffer)
(set-buffer-multibyte t) (let (deactivate-mark) (insert-file-contents fullname)) (if (and enable-multibyte-characters (or (eq (coding-system-type last-coding-system-used)
(quote raw-text)))) (set-buffer-multibyte nil)) (set-buffer-modified-p nil)) (eval-buffer buffer nil (if purify-flag file fullname) nil t)) (let (kill-buffer-hook
kill-buffer-query-functions) (kill-buffer buffer)))
(let* ((buffer (get-buffer-create (generate-new-buffer-name " *load*"))) (load-in-progress t) (source (let ((save-match-data-internal (match-data))) (unwind-protect
(progn (string-match "\\.el\\'" fullname)) (set-match-data save-match-data-internal (quote evaporate)))))) (if nomessage nil (if source (message "Loading %s (source)..."
file) (message "Loading %s..." file))) (if purify-flag (progn (setq preloaded-file-list (cons (purecopy file) preloaded-file-list)))) (unwind-protect (let ((load-file-name
fullname) (set-auto-coding-for-load t) (inhibit-file-name-operation nil)) (save-current-buffer (set-buffer buffer) (set-buffer-multibyte t) (let (deactivate-mark)
(insert-file-contents fullname)) (if (and enable-multibyte-characters (or (eq ... ...))) (set-buffer-multibyte nil)) (set-buffer-modified-p nil)) (eval-buffer buffer nil
(if purify-flag file fullname) nil t)) (let (kill-buffer-hook kill-buffer-query-functions) (kill-buffer buffer))) (do-after-load-evaluation fullname) (if (or nomessage
noninteractive) nil (if source (message "Loading %s (source)...done" file) (message "Loading %s...done" file))) t)
(if (null (file-readable-p fullname)) (and (null noerror) (signal (quote file-error) (list "Cannot open load file" file))) (let* ((buffer (get-buffer-create
(generate-new-buffer-name " *load*"))) (load-in-progress t) (source (let ((save-match-data-internal (match-data))) (unwind-protect (progn (string-match "\\.el\\'"
fullname)) (set-match-data save-match-data-internal (quote evaporate)))))) (if nomessage nil (if source (message "Loading %s (source)..." file) (message "Loading %s..."
file))) (if purify-flag (progn (setq preloaded-file-list (cons (purecopy file) preloaded-file-list)))) (unwind-protect (let ((load-file-name fullname)
(set-auto-coding-for-load t) (inhibit-file-name-operation nil)) (save-current-buffer (set-buffer buffer) (set-buffer-multibyte t) (let (deactivate-mark)
(insert-file-contents fullname)) (if (and enable-multibyte-characters (or ...)) (set-buffer-multibyte nil)) (set-buffer-modified-p nil)) (eval-buffer buffer nil (if
purify-flag file fullname) nil t)) (let (kill-buffer-hook kill-buffer-query-functions) (kill-buffer buffer))) (do-after-load-evaluation fullname) (if (or nomessage
noninteractive) nil (if source (message "Loading %s (source)...done" file) (message "Loading %s...done" file))) t))
load-with-code-conversion("MY-PATH/test-ob-emacs-lisp.el" "MY-PATH/test-ob-emacs-lisp.el" nil nil)
load("MY-PATH/test-ob-emacs-lisp.el" nil nil t)
load-file("MY-PATH/test-ob-emacs-lisp.el")
(progn (load-file path))
(if (string-match "^[A-Za-z].*\\.el$" (file-name-nondirectory path)) (progn (load-file path)))
(condition-case err (if (string-match "^[A-Za-z].*\\.el$" (file-name-nondirectory path)) (progn (load-file path))) (missing-test-dependency (let ((name (intern (concat
"org-missing-dependency/" (file-name-nondirectory ...))))) (eval (cons (quote ert-deftest) (cons name (quote (nil :expected-result :failed ...))))))))
(if (file-directory-p path) (rld path) (condition-case err (if (string-match "^[A-Za-z].*\\.el$" (file-name-nondirectory path)) (progn (load-file path)))
(missing-test-dependency (let ((name (intern (concat "org-missing-dependency/" ...)))) (eval (cons (quote ert-deftest) (cons name (quote ...))))))))
(lambda (path) (if (file-directory-p path) (rld path) (condition-case err (if (string-match "^[A-Za-z].*\\.el$" (file-name-nondirectory path)) (progn (load-file path)))
(missing-test-dependency (let ((name (intern ...))) (eval (cons (quote ert-deftest) (cons name ...))))))))("MY-PATH/test-ob-emacs-lisp.el")
mapc((lambda (path) (if (file-directory-p path) (rld path) (condition-case err (if (string-match "^[A-Za-z].*\\.el$" (file-name-nondirectory path)) (progn (load-file
path))) (missing-test-dependency (let ((name (intern ...))) (eval (cons (quote ert-deftest) (cons name ...)))))))) ("MY-PATH/test-ob-C.el" "MY-PATH/test-ob-R.el"
"MY-PATH/test-ob-awk.el" "MY-PATH/test-ob-emacs-lisp.el" "MY-PATH/test-ob-exp.el" "MY-PATH/test-ob-fortran.el" "MY-PATH/test-ob-lilypond.el" "MY-PATH/test-ob-lob.el"
"MY-PATH/test-ob-maxima.el" "MY-PATH/test-ob-octave.el" "MY-PATH/test-ob-perl.el" "MY-PATH/test-ob-python.el" "MY-PATH/test-ob-sh.el" "MY-PATH/test-ob-table.el"
"MY-PATH/test-ob-tangle.el" "MY-PATH/test-ob.el" "MY-PATH/test-org-clock.el" "MY-PATH/test-org-element.el" "MY-PATH/test-org-footnote.el" "MY-PATH/test-org-list.el"
"MY-PATH/test-org-macro.el" "MY-PATH/test-org-src.el" "MY-PATH/test-org-table.el" "MY-PATH/test-org.el" "MY-PATH/test-ox.el" "MY-PATH/test-property-inheritance.el"))
(progn (mapc (function (lambda (path) (if (file-directory-p path) (rld path) (condition-case err (if (string-match "^[A-Za-z].*\\.el$" ...) (progn ...))
(missing-test-dependency (let ... ...)))))) (directory-files base (quote full) "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.el$")))
rld("MY-PATH/lisp")
(progn (if (eq vnew (quote cl--unbound)) (fmakunbound #1=(quote rld)) (fset #1# vnew)) (rld (expand-file-name "lisp" org-test-dir)))
(unwind-protect (progn (if (eq vnew . #2=((quote cl--unbound))) (fmakunbound #1=(quote rld)) (fset #1# vnew)) (rld (expand-file-name "lisp" org-test-dir))) (if (eq old .
#2#) (fmakunbound #1#) (fset #1# old)))
(let* ((vnew (function (lambda (base) (progn (mapc (function ...) (directory-files base ... "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.el$")))))) (old (if (fboundp
#1=(quote rld)) (symbol-function #1#) (quote cl--unbound)))) (unwind-protect (progn (if (eq vnew . #2=((quote cl--unbound))) (fmakunbound #1#) (fset #1# vnew)) (rld
(expand-file-name "lisp" org-test-dir))) (if (eq old . #2#) (fmakunbound #1#) (fset #1# old))))
org-test-load()
org-test-run-all-tests()
(progn (org-test-run-all-tests))
eval((progn (org-test-run-all-tests)))
((lambda (result) (if (member "none" #1=(cdr (assoc :result-params params))) nil (if (or (member "scalar" #1#) (member "verbatim" #1#) (member "html" #1#) (member "code"
#1#) (member "pp" #1#) (and (member "output" #1#) (not (member "table" #1#)))) (let ((print-level nil) (print-length nil)) (if (or (member "scalar" ...) (member "verbatim"
...)) (format "%S" result) (format "%s" result))) (org-babel-reassemble-table result (org-babel-pick-name (cdr (assoc :colname-names params)) (cdr (assoc :colnames
params))) (org-babel-pick-name (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params))))))) (eval (read (format (if (member "output" (cdr (assoc :result-params
params))) "(with-output-to-string %s)" "(progn %s)") (org-babel-expand-body:emacs-lisp body params)))))
(progn ((lambda (result) (if (member "none" #1=(cdr (assoc :result-params params))) nil (if (or (member "scalar" #1#) (member "verbatim" #1#) (member "html" #1#) (member
"code" #1#) (member "pp" #1#) (and (member "output" #1#) (not ...))) (let ((print-level nil) (print-length nil)) (if (or ... ...) (format "%S" result) (format "%s"
result))) (org-babel-reassemble-table result (org-babel-pick-name (cdr ...) (cdr ...)) (org-babel-pick-name (cdr ...) (cdr ...)))))) (eval (read (format (if (member
"output" (cdr ...)) "(with-output-to-string %s)" "(progn %s)") (org-babel-expand-body:emacs-lisp body params))))))
(unwind-protect (progn ((lambda (result) (if (member "none" #1=(cdr (assoc :result-params params))) nil (if (or (member "scalar" #1#) (member "verbatim" #1#) (member
"html" #1#) (member "code" #1#) (member "pp" #1#) (and ... ...)) (let (... ...) (if ... ... ...)) (org-babel-reassemble-table result (org-babel-pick-name ... ...)
(org-babel-pick-name ... ...))))) (eval (read (format (if (member "output" ...) "(with-output-to-string %s)" "(progn %s)") (org-babel-expand-body:emacs-lisp body
params)))))) (set-window-configuration wconfig))
(let ((wconfig (current-window-configuration))) (unwind-protect (progn ((lambda (result) (if (member "none" #1=(cdr ...)) nil (if (or ... ... ... ... ... ...) (let ...
...) (org-babel-reassemble-table result ... ...)))) (eval (read (format (if ... "(with-output-to-string %s)" "(progn %s)") (org-babel-expand-body:emacs-lisp body
params)))))) (set-window-configuration wconfig)))
org-babel-execute:emacs-lisp("(org-test-run-all-tests)" ((:comments . #1="") (:shebang . #1#) (:cache . "no") (:padline . #1#) (:noweb . "no") (:tangle . "no") (:exports
. "code") (:results . "silent") (:session . "none") (:padnewline . "yes") (:hlines . "yes") (:colnames . "no") (:result-type . value) (:result-params "silent")
(:rowname-names) (:colname-names)))
funcall(org-babel-execute:emacs-lisp "(org-test-run-all-tests)" ((:comments . #1="") (:shebang . #1#) (:cache . "no") (:padline . #1#) (:noweb . "no") (:tangle . "no")
(:exports . "code") (:results . "silent") (:session . "none") (:padnewline . "yes") (:hlines . "yes") (:colnames . "no") (:result-type . value) (:result-params "silent")
(:rowname-names) (:colname-names)))
((lambda (result) (if (and (eq (cdr (assoc :result-type params)) (quote value)) (or (member "vector" result-params) (member "table" result-params)) (not (listp result)))
(list (list result)) result)) (funcall cmd body params))
(setq result ((lambda (result) (if (and (eq (cdr (assoc :result-type params)) (quote value)) (or (member "vector" result-params) (member "table" result-params)) (not
(listp result))) (list (list result)) result)) (funcall cmd body params)))
(if (member "none" result-params) (progn (funcall cmd body params) (message "result silenced")) (setq result ((lambda (result) (if (and (eq (cdr ...) (quote value)) (or
(member "vector" result-params) (member "table" result-params)) (not (listp result))) (list (list result)) result)) (funcall cmd body params))) (if (cdr (assoc :file
params)) (progn (if result (progn (let ((temp-file ...) (temp-buffer ...)) (unwind-protect (prog1 ... ...) (and ... ...))))) (setq result (cdr (assoc :file params)))))
(org-babel-insert-result result result-params info new-hash indent lang) (run-hooks (quote org-babel-after-execute-hook)) result)
(let ((call-process-region (function (lambda (&rest args) (apply (quote org-babel-tramp-handle-call-process-region) args))))) (let ((lang-check (function (lambda (f)
(let (...) (if ... ...)))))) (setq cmd (or (funcall lang-check lang) (funcall lang-check (symbol-name (cdr (assoc lang org-src-lang-modes)))) (error "No org-babel-execute
function for %s!" lang)))) (message "executing %s code block%s..." (capitalize lang) (if (nth 4 info) (format " (%s)" (nth 4 info)) "")) (if (member "none" result-params)
(progn (funcall cmd body params) (message "result silenced")) (setq result ((lambda (result) (if (and (eq ... ...) (or ... ...) (not ...)) (list (list result)) result))
(funcall cmd body params))) (if (cdr (assoc :file params)) (progn (if result (progn (let (... ...) (unwind-protect ... ...)))) (setq result (cdr (assoc :file params)))))
(org-babel-insert-result result result-params info new-hash indent lang) (run-hooks (quote org-babel-after-execute-hook)) result))
(unwind-protect (let ((call-process-region (function (lambda (&rest args) (apply (quote org-babel-tramp-handle-call-process-region) args))))) (let ((lang-check (function
(lambda (f) (let ... ...))))) (setq cmd (or (funcall lang-check lang) (funcall lang-check (symbol-name (cdr ...))) (error "No org-babel-execute function for %s!" lang))))
(message "executing %s code block%s..." (capitalize lang) (if (nth 4 info) (format " (%s)" (nth 4 info)) "")) (if (member "none" result-params) (progn (funcall cmd body
params) (message "result silenced")) (setq result ((lambda (result) (if (and ... ... ...) (list ...) result)) (funcall cmd body params))) (if (cdr (assoc :file params))
(progn (if result (progn (let ... ...))) (setq result (cdr (assoc :file params))))) (org-babel-insert-result result result-params info new-hash indent lang) (run-hooks
(quote org-babel-after-execute-hook)) result)) (setq call-process-region (quote org-babel-call-process-region-original)))
(let* ((lang (nth 0 info)) (result-params (cdr (assoc :result-params params))) (body (let* ((c (nthcdr 1 info))) (setcar c (if (org-babel-noweb-p params :eval)
(org-babel-expand-noweb-references info) (nth 1 info))))) (dir (cdr (assoc :dir params))) (default-directory (or (and dir (file-name-as-directory (expand-file-name dir)))
default-directory)) (org-babel-call-process-region-original (or (and (boundp (quote org-babel-call-process-region-original)) org-babel-call-process-region-original)
(symbol-function (quote call-process-region)))) (indent (car (last info))) result cmd) (unwind-protect (let ((call-process-region (function (lambda (&rest args) (apply ...
args))))) (let ((lang-check (function (lambda ... ...)))) (setq cmd (or (funcall lang-check lang) (funcall lang-check (symbol-name ...)) (error "No org-babel-execute
function for %s!" lang)))) (message "executing %s code block%s..." (capitalize lang) (if (nth 4 info) (format " (%s)" (nth 4 info)) "")) (if (member "none" result-params)
(progn (funcall cmd body params) (message "result silenced")) (setq result ((lambda (result) (if ... ... result)) (funcall cmd body params))) (if (cdr (assoc :file params))
(progn (if result (progn ...)) (setq result (cdr ...)))) (org-babel-insert-result result result-params info new-hash indent lang) (run-hooks (quote
org-babel-after-execute-hook)) result)) (setq call-process-region (quote org-babel-call-process-region-original))))
(cond (cache-current-p (save-excursion (goto-char (org-babel-where-is-src-block-result nil info)) (end-of-line 1) (forward-char 1) (let ((result
(org-babel-read-result))) (message (replace-regexp-in-string "%" "%%" (format "%S" result))) result))) ((org-babel-confirm-evaluate (let ((i info)) (let* ((c (nthcdr 2 i)))
(setcar c merged-params)) i)) (let* ((lang (nth 0 info)) (result-params (cdr (assoc :result-params params))) (body (let* ((c ...)) (setcar c (if ... ... ...)))) (dir (cdr
(assoc :dir params))) (default-directory (or (and dir (file-name-as-directory ...)) default-directory)) (org-babel-call-process-region-original (or (and (boundp ...)
org-babel-call-process-region-original) (symbol-function (quote call-process-region)))) (indent (car (last info))) result cmd) (unwind-protect (let ((call-process-region
(function ...))) (let ((lang-check ...)) (setq cmd (or ... ... ...))) (message "executing %s code block%s..." (capitalize lang) (if (nth 4 info) (format " (%s)" ...) ""))
(if (member "none" result-params) (progn (funcall cmd body params) (message "result silenced")) (setq result (... ...)) (if (cdr ...) (progn ... ...))
(org-babel-insert-result result result-params info new-hash indent lang) (run-hooks (quote org-babel-after-execute-hook)) result)) (setq call-process-region (quote
org-babel-call-process-region-original))))))
(let* ((params (if params (org-babel-process-params merged-params) (nth 2 info))) (cachep (and (not arg) (cdr (assoc :cache params)) (string= "yes" (cdr (assoc :cache
params))))) (new-hash (if cachep (progn (org-babel-sha1-hash info)))) (old-hash (if cachep (progn (org-babel-current-result-hash)))) (cache-current-p (and (not arg)
new-hash (equal new-hash old-hash)))) (cond (cache-current-p (save-excursion (goto-char (org-babel-where-is-src-block-result nil info)) (end-of-line 1) (forward-char 1)
(let ((result (org-babel-read-result))) (message (replace-regexp-in-string "%" "%%" (format "%S" result))) result))) ((org-babel-confirm-evaluate (let ((i info)) (let* ((c
...)) (setcar c merged-params)) i)) (let* ((lang (nth 0 info)) (result-params (cdr (assoc :result-params params))) (body (let* (...) (setcar c ...))) (dir (cdr (assoc :dir
params))) (default-directory (or (and dir ...) default-directory)) (org-babel-call-process-region-original (or (and ... org-babel-call-process-region-original)
(symbol-function ...))) (indent (car (last info))) result cmd) (unwind-protect (let ((call-process-region ...)) (let (...) (setq cmd ...)) (message "executing %s code
block%s..." (capitalize lang) (if ... ... "")) (if (member "none" result-params) (progn ... ...) (setq result ...) (if ... ...) (org-babel-insert-result result
result-params info new-hash indent lang) (run-hooks ...) result)) (setq call-process-region (quote org-babel-call-process-region-original)))))))
(progn (let* ((params (if params (org-babel-process-params merged-params) (nth 2 info))) (cachep (and (not arg) (cdr (assoc :cache params)) (string= "yes" (cdr (assoc
:cache params))))) (new-hash (if cachep (progn (org-babel-sha1-hash info)))) (old-hash (if cachep (progn (org-babel-current-result-hash)))) (cache-current-p (and (not arg)
new-hash (equal new-hash old-hash)))) (cond (cache-current-p (save-excursion (goto-char (org-babel-where-is-src-block-result nil info)) (end-of-line 1) (forward-char 1)
(let ((result ...)) (message (replace-regexp-in-string "%" "%%" ...)) result))) ((org-babel-confirm-evaluate (let ((i info)) (let* (...) (setcar c merged-params)) i)) (let*
((lang (nth 0 info)) (result-params (cdr ...)) (body (let* ... ...)) (dir (cdr ...)) (default-directory (or ... default-directory)) (org-babel-call-process-region-original
(or ... ...)) (indent (car ...)) result cmd) (unwind-protect (let (...) (let ... ...) (message "executing %s code block%s..." ... ...) (if ... ... ... ... ... ... result))
(setq call-process-region (quote org-babel-call-process-region-original))))))))
(if (org-babel-check-evaluate (let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i)) (progn (let* ((params (if params (org-babel-process-params
merged-params) (nth 2 info))) (cachep (and (not arg) (cdr (assoc :cache params)) (string= "yes" (cdr ...)))) (new-hash (if cachep (progn (org-babel-sha1-hash info))))
(old-hash (if cachep (progn (org-babel-current-result-hash)))) (cache-current-p (and (not arg) new-hash (equal new-hash old-hash)))) (cond (cache-current-p (save-excursion
(goto-char (org-babel-where-is-src-block-result nil info)) (end-of-line 1) (forward-char 1) (let (...) (message ...) result))) ((org-babel-confirm-evaluate (let (...) (let*
... ...) i)) (let* ((lang ...) (result-params ...) (body ...) (dir ...) (default-directory ...) (org-babel-call-process-region-original ...) (indent ...) result cmd)
(unwind-protect (let ... ... ... ...) (setq call-process-region ...))))))))
(let* ((info (or info (org-babel-get-src-block-info))) (merged-params (org-babel-merge-params (nth 2 info) params))) (if (org-babel-check-evaluate (let ((i info)) (let*
((c (nthcdr 2 i))) (setcar c merged-params)) i)) (progn (let* ((params (if params (org-babel-process-params merged-params) (nth 2 info))) (cachep (and (not arg) (cdr ...)
(string= "yes" ...))) (new-hash (if cachep (progn ...))) (old-hash (if cachep (progn ...))) (cache-current-p (and (not arg) new-hash (equal new-hash old-hash)))) (cond
(cache-current-p (save-excursion (goto-char ...) (end-of-line 1) (forward-char 1) (let ... ... result))) ((org-babel-confirm-evaluate (let ... ... i)) (let* (... ... ...
... ... ... ... result cmd) (unwind-protect ... ...))))))))
org-babel-execute-src-block(nil ("emacs-lisp" "(org-test-run-all-tests)" ((:comments . #1="") (:shebang . #1#) (:cache . "no") (:padline . #1#) (:noweb . "no") (:tangle
. "no") (:exports . "code") (:results . "silent") (:session . "none") (:padnewline . "yes") (:hlines . "yes") (:colnames . "no") (:result-type . value) (:result-params
"silent") (:rowname-names) (:colname-names)) "" nil 3))
(progn (org-babel-eval-wipe-error-buffer) (org-babel-execute-src-block current-prefix-arg info) t)
(if info (progn (org-babel-eval-wipe-error-buffer) (org-babel-execute-src-block current-prefix-arg info) t) nil)
(let ((info (org-babel-get-src-block-info))) (if info (progn (org-babel-eval-wipe-error-buffer) (org-babel-execute-src-block current-prefix-arg info) t) nil))
org-babel-execute-src-block-maybe()
(or (org-babel-execute-src-block-maybe) (org-babel-lob-execute-maybe))
org-babel-execute-maybe()
(if org-babel-no-eval-on-ctrl-c-ctrl-c nil (org-babel-execute-maybe))
org-babel-execute-safely-maybe()
run-hook-with-args-until-success(org-babel-execute-safely-maybe)
(cond ((or (and (boundp (quote org-clock-overlays)) org-clock-overlays) org-occur-highlights org-latex-fragment-image-overlays) (and (boundp (quote org-clock-overlays))
(org-clock-remove-overlays)) (org-remove-occur-highlights) (org-remove-latex-fragment-image-overlays) (message "Temporary highlights/overlays removed from current buffer"))
((and (local-variable-p (quote org-finish-function) (current-buffer)) (fboundp org-finish-function)) (funcall org-finish-function)) ((run-hook-with-args-until-success
(quote org-ctrl-c-ctrl-c-hook))) (t (let* ((context (org-element-context)) (type (org-element-type context))) (if (save-excursion (beginning-of-line) (looking-at "[ ]*$"))
(or (run-hook-with-args-until-success (quote org-ctrl-c-ctrl-c-final-hook)) (user-error "C-c C-c can do nothing useful at this location")) (if (eq type (quote paragraph))
(progn (let (...) (if ... ...)))) (cond ((eql type (quote clock)) (org-clock-update-time-maybe)) ((eql type (quote dynamic-block)) (save-excursion (goto-char ...)
(org-update-dblock))) ((eql type (quote footnote-definition)) (goto-char (org-element-property :post-affiliated context)) (call-interactively (quote org-footnote-action)))
((eql type (quote footnote-reference)) (call-interactively (quote org-footnote-action))) ((memql type (quote ...)) (save-excursion (goto-char ...) (call-interactively
...))) ((eql type (quote item)) (let* (... ... ... ... ... ...) (org-list-set-checkbox ... struct ...) (org-list-struct-fix-ind struct parents 2)
(org-list-struct-fix-item-end struct) (org-list-struct-fix-bul struct prevs) (org-list-struct-fix-ind struct parents) (let ... ... ...))) ((eql type (quote keyword)) (let
(... ...) (if ... ...) (let ... ... --rtn)) (message "Local setup has been refreshed")) ((eql type (quote plain-list)) (let* (... ... ... ... ...) (cond ... ...)
(org-list-write-struct struct ... old-struct) (org-update-checkbox-count-maybe) (save-excursion ... ...))) ((memql type (quote ...)) (call-interactively (quote
org-property-action))) ((memql type (quote ...)) (call-interactively (quote org-update-radio-target-regexp))) ((eql type (quote statistics-cookie)) (call-interactively
(quote org-update-statistics-cookies))) ((memql type (quote ...)) (if (eq ... ...) (message "Use C-c ' to edit table.el tables") (let ... ...))) ((eql type (quote
timestamp)) (org-timestamp-change 0 (quote day))) (t (or (run-hook-with-args-until-success ...) (user-error "C-c C-c can do nothing useful at this location"))))))))
org-ctrl-c-ctrl-c(nil)
call-interactively(org-ctrl-c-ctrl-c nil nil)
[-- Attachment #2: test-ob-emacs-lisp.el.patch --]
[-- Type: text/x-patch, Size: 3062 bytes --]
commit 59f3ed34ab7b032ce926c7b2e8f37460c1a7d619
Author: Andreas Roehler <andreas.roehler@online.de>
Date: Tue Mar 12 16:44:13 2013 +0100
Fix missing `case-fold-search', test-ob-emacs-lisp.el
Running tests from org-mode/testing/README failed due to missing case-folding
Downcased "result" was searched while upcased was inserted
diff --git a/testing/lisp/test-ob-emacs-lisp.el b/testing/lisp/test-ob-emacs-lisp.el
index 94092e4..ed85a6d 100644
--- a/testing/lisp/test-ob-emacs-lisp.el
+++ b/testing/lisp/test-ob-emacs-lisp.el
@@ -24,55 +24,58 @@
;;; Code:
(ert-deftest ob-emacs-lisp/commented-last-block-line-no-var ()
- (org-test-with-temp-text-in-file "
+ (let (case-fold-search)
+ (org-test-with-temp-text-in-file "
#+begin_src emacs-lisp
;;
#+end_src"
- (org-babel-next-src-block)
- (org-ctrl-c-ctrl-c)
- (should (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 "
+ (org-babel-next-src-block)
+ (org-ctrl-c-ctrl-c)
+ (should (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
\"some text\";;
#+end_src"
- (org-babel-next-src-block)
- (org-ctrl-c-ctrl-c)
- (should (re-search-forward "results:" nil t))
- (forward-line)
- (should
- (string=
- ": some text"
- (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
+ (org-babel-next-src-block)
+ (org-ctrl-c-ctrl-c)
+ (should (re-search-forward "results:" nil t))
+ (forward-line)
+ (should
+ (string=
+ ": some text"
+ (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))))
(ert-deftest ob-emacs-lisp/commented-last-block-line-with-var ()
- (org-test-with-temp-text-in-file "
+ (let (case-fold-search)
+ (org-test-with-temp-text-in-file "
#+begin_src emacs-lisp :var a=1
;;
#+end_src"
+ (org-babel-next-src-block)
+ (org-ctrl-c-ctrl-c)
+ (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
+2;;
+#+end_src"
(org-babel-next-src-block)
(org-ctrl-c-ctrl-c)
(re-search-forward "results" nil t)
(forward-line)
(should (string=
- ""
+ ": 2"
(buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
-(org-test-with-temp-text-in-file "
-#+begin_src emacs-lisp :var a=2
-2;;
-#+end_src"
- (org-babel-next-src-block)
- (org-ctrl-c-ctrl-c)
- (re-search-forward "results" nil t)
- (forward-line)
- (should (string=
- ": 2"
- (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))
+
(provide 'test-ob-emacs-lisp)
;;; test-ob-emacs-lisp.el ends here
next reply other threads:[~2013-03-12 15:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 15:45 Andreas Röhler [this message]
2013-03-12 15:59 ` FIX missing case-folding in test-ob-emacs-lisp.el Bastien
2013-03-12 16:40 ` Andreas Röhler
2013-03-12 17:12 ` Andreas Röhler
2013-03-13 17:19 ` Michael Brand
2013-03-13 17:33 ` Andreas Röhler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=513F4D96.6000702@easy-emacs.de \
--to=andreas.roehler@easy-emacs.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).