From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martyn Jago Subject: Re: [babel] Collection of code block snippets Date: Thu, 08 Sep 2011 23:03:59 +0100 Message-ID: References: <878vq48dvt.fsf@gmail.com> <87zkiiq4ko.fsf@gmail.com> <87bouxr3v1.fsf@gmail.com> <87mxef6p4r.fsf@gmail.com> <87bouvdj15.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1mhp-0000Wu-Pw for emacs-orgmode@gnu.org; Thu, 08 Sep 2011 18:04:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1mho-0003vo-5x for emacs-orgmode@gnu.org; Thu, 08 Sep 2011 18:04:21 -0400 Received: from lo.gmane.org ([80.91.229.12]:40585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1mhn-0003v1-Rs for emacs-orgmode@gnu.org; Thu, 08 Sep 2011 18:04:20 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R1mhm-0005AJ-1G for emacs-orgmode@gnu.org; Fri, 09 Sep 2011 00:04:18 +0200 Received: from 88-96-171-142.dsl.zen.co.uk ([88.96.171.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Sep 2011 00:04:18 +0200 Received: from martyn.jago by 88-96-171-142.dsl.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Sep 2011 00:04:18 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hi Eric Martyn Jago writes: > Hi Eric > > Eric Schulte writes: > >> Hi Martyn, >> >>> >>> I have written a few more tests for inline source blocks execution with >>> org-ctrl-c-ctrl-c (not extensive by any means). >> >> Thanks for adding these tests, I get 6 failures all with the same error >> [1], is that intentional? If not would you mind taking another look at >> this patch? I reverse-engineered my =test-init.el= script using a call to =org-test-run-batch-tests= and from that worked out why your script was breaking tests. One problem on my system is that emacs was using the wrong org mode since the newer org location wasn't known about. Also, the languages, emacs-lisp and sh need to be switched on (I thought emacs-lisp was on by default)? Now all tests pass. My minimised script... --8<---------------cut here---------------start------------->8--- (let ((org-dir "~/org-mode/")) (add-to-list 'load-path (concat org-dir "lisp")) (add-to-list 'load-path (concat org-dir "testing")) (require 'org-test) (setq org-confirm-babel-evaluate nil) (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (sh . t))) (org-test-run-batch-tests)) --8<---------------cut here---------------end--------------->8--- Called by... --8<---------------cut here---------------start------------->8--- emacs -Q -script ~/orgmode/testing/test-init.el --8<---------------cut here---------------end--------------->8--- Your modified script... --8<---------------cut here---------------start------------->8--- emacs -Q -batch -L ~/org-mode/lisp ~/org-mode/testing -l org-test.el \ -eval "(progn(setq org-confirm-babel-evaluate nil) \ (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp \ . t) (sh . t))))" -f org-test-run-batch-tests --8<---------------cut here---------------end--------------->8--- I've fixed my typos in test-ob.el below. Best, Martyn --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-testing-lisp-test-ob.el-Fixed-typo.patch Content-Description: Fixed typos in test-ob.el >From a444094303e48cbb5f4027e83f8dcf60d240204b Mon Sep 17 00:00:00 2001 From: Martyn Jago Date: Thu, 8 Sep 2011 22:34:38 +0100 Subject: [PATCH] * testing/lisp/test-ob.el: Fixed typo --- testing/lisp/test-ob.el | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el index 9735bd8..1f04c5b 100644 --- a/testing/lisp/test-ob.el +++ b/testing/lisp/test-ob.el @@ -390,13 +390,13 @@ (should (string= (concat test-line " [[file:~/test-file]]") (buffer-substring-no-properties (point-min) (point-max))))))) -(ert-deftest test-org-babel/inline-src_blk-results-scaler () +(ert-deftest test-org-babel/inline-src_blk-results-scalar () (with-temp-buffer - (let ((test-line "src_emacs-lisp[ :results scaler ]{ \"x\" }")) + (let ((test-line "src_emacs-lisp[ :results scalar ]{ \"x\" }")) (insert test-line) (goto-char (point-min)) (org-ctrl-c-ctrl-c) - (should (string= (concat test-line " =x=") + (should (string= (concat test-line " =\"x\"=") (buffer-substring-no-properties (point-min) (point-max))))))) (ert-deftest test-org-babel/inline-src_blk-results-verbatim () -- 1.7.3.4 --=-=-= Content-Type: text/plain [...] --=-=-=--