summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Vauban <sva@mygooglest.com>2011-09-16 12:06:21 +0200
committerEric Schulte <schulte.eric@gmail.com>2011-09-16 09:52:34 -0600
commitfefff8ec8713b5536725765f4875355b13cc9674 (patch)
tree6243cbe6d94b804fe652ae86a6db05168c044fcd
parent6844094edb9ade69ed89fcc1e590b18018b719d4 (diff)
downloadorg-mode-fefff8ec8713b5536725765f4875355b13cc9674.tar.gz
Add test checking that any variable declared with no default value will generate a proper error message.
-rw-r--r--testing/lisp/test-ob.el11
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