From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: [PATCH]: BUG fix and Add header-args property to source block info Date: Thu, 12 Feb 2015 10:27:43 -0800 Message-ID: References: <871tlxxxd6.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLyUU-0003j9-V6 for emacs-orgmode@gnu.org; Thu, 12 Feb 2015 13:27:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLyUR-0002W9-Pg for emacs-orgmode@gnu.org; Thu, 12 Feb 2015 13:27:54 -0500 Received: from iport-acv2-out.ucsd.edu ([132.239.0.174]:32568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLyUR-0002VK-HI for emacs-orgmode@gnu.org; Thu, 12 Feb 2015 13:27:51 -0500 In-Reply-To: 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: Rainer M Krug Cc: emacs-orgmode@gnu.org, Nicolas Goaziou On Thu, 12 Feb 2015, Rainer M Krug wrote: > > Rainer M Krug writes: > >> Nicolas Goaziou writes: >> >>> Hello, >>> >>> Rainer M Krug writes: >>> >>>> Please find attached the below described patch including the fix for the >>>> error reported - function raises error when property value is numeric. >>> >>> Looks good. Thank you. >> >> Thanks. >> >>> >> >> >>> Could you provide an appropriate commit message? >> >> Here is the patch attached with the commit message - hope it is OK. >> >>> Bonus points if you also add a test. > > I think I will skip the bonus points this time - sorry. > > I would be very grateful if you could submit the patch without a test. > > Cheers, > > Rainer > >> >> Are there some guidelines on how to write tests? Never done this before... Alan's suggestions are good. To which I might add browse `testing/README'. Try this. Evaluate these blocks: #+BEGIN_SRC emacs-lisp :var here=(buffer-file-name) (add-to-list 'load-path (file-name-directory here)) (require 'org-test) #+END_SRC #+BEGIN_SRC emacs-lisp (ert-deftest test-org-babel/view-src-block-info-for-identity () "Check `(identity #o444)' in header-args property." (org-test-with-temp-text "#+PROPERTY: header-args :tangle-mode (identity #o444) ,#+begin_src emacs-lisp (+ 1 2) ,#+end_src" (org-mode-restart) (forward-line 2) (org-babel-view-src-block-info))) #+END_SRC Then do ` M-x ert RET t RET' and a window should pop up showing that you either passed (with your patch) or failed (without your patch) 1 test. If that much works, then submit a patch for testing/lisp/test-ob.el. HTH, Chuck