>From 453c0d5e54544ef5812098817746b4280375f5e4 Mon Sep 17 00:00:00 2001 From: Sebastien Vauban Date: Fri, 16 Sep 2011 12:06:21 +0200 Subject: [PATCH] Add test checking that any variable declared with no default value will generate a proper error message. --- testing/lisp/test-ob.el | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el index 2e71a59..f78ca98 100644 --- a/testing/lisp/test-ob.el +++ b/testing/lisp/test-ob.el @@ -1,6 +1,6 @@ ;;; test-ob.el --- tests for ob.el -;; Copyright (c) 2010 Eric Schulte +;; Copyright (c) 2010, 2011 Eric Schulte ;; Authors: Eric Schulte, Martyn Jago ;; Released under the GNU General Public License version 3 @@ -421,6 +421,15 @@ (next-result) (should (not (org-babel-in-example-or-verbatim)))))) +(ert-deftest test-org-babel/no-defaut-value-for-var () + "Test that the absence of a default value for a variable DOES THROW + a proper error." + (org-test-at-id "f2df5ba6-75fa-4e6b-8441-65ed84963627" + (org-babel-next-src-block) + (let ((err + (should-error (org-babel-execute-src-block) :type 'error))) + (should (equal '(error "variable \"x\" in block \"carre\" must be assigned a default value") err))))) + (provide 'test-ob) ;;; test-ob ends here -- 1.7.5.1