[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org e204c3a6cc 1/8: test-ob-shell.el: Split test-ob-she
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org e204c3a6cc 1/8: test-ob-shell.el: Split test-ob-shell/dont-error-on-empty-results |
Date: |
Wed, 11 Jan 2023 11:58:07 -0500 (EST) |
branch: externals/org
commit e204c3a6ccdaf1770db5e931f1116235597a8c0b
Author: Matt Trzcinski <matt@excalamus.com>
Commit: Matt Trzcinski <matt@excalamus.com>
test-ob-shell.el: Split test-ob-shell/dont-error-on-empty-results
* testing/lisp/test-ob-shell.el
(test-ob-shell/dont-error-on-empty-results): Explicitly test handling
of empty results.
(test-ob-shell/dont-error-on-babel-error): Explicitly test handling of
Babel errors. On pass, remove buffers created during test.
Original test conflated empty results (a valid Babel return) and Babel
errors.
---
testing/lisp/test-ob-shell.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/testing/lisp/test-ob-shell.el b/testing/lisp/test-ob-shell.el
index b0d9beff46..fc3ecd3c8f 100644
--- a/testing/lisp/test-ob-shell.el
+++ b/testing/lisp/test-ob-shell.el
@@ -34,12 +34,16 @@ unless the body of the tangled block does."
(should-not (string-match "^[\n\r][\t ]*[\n\r]"
(org-babel-expand-body:generic "echo 2" '())))
(should (string-match "^[\n\r][\t ]*[\n\r]"
- (org-babel-expand-body:generic "\n\necho 2" '()))))
+ (org-babel-expand-body:generic "\n\necho 2" '()))))
(ert-deftest test-ob-shell/dont-error-on-empty-results ()
- "Was throwing an elisp error when shell blocks threw errors and
-returned empty results."
- (should (null (org-babel-execute:sh "ls NoSuchFileOrDirectory.txt" nil))))
+ "Empty results should not cause a Lisp error."
+ (should (null (org-babel-execute:sh "" nil))))
+
+(ert-deftest test-ob-shell/dont-error-on-babel-error ()
+ "Errors within Babel execution should not cause Lisp errors."
+ (if (should (null (org-babel-execute:sh "ls NoSuchFileOrDirectory.txt" nil)))
+ (kill-buffer "*Org-Babel Error Output*")))
(ert-deftest test-ob-shell/session ()
"This also tests `org-babel-comint-with-output' in
- [elpa] externals/org updated (07c63df9c7 -> 4f319088ba), ELPA Syncer, 2023/01/11
- [elpa] externals/org 4f319088ba 8/8: Merge branch 'ob-shell-cleanup-tests', ELPA Syncer, 2023/01/11
- [elpa] externals/org e204c3a6cc 1/8: test-ob-shell.el: Split test-ob-shell/dont-error-on-empty-results,
ELPA Syncer <=
- [elpa] externals/org 6e0012867d 2/8: test-ob-shell.el: Refactor test-ob-shell/session, ELPA Syncer, 2023/01/11
- [elpa] externals/org 9485450222 6/8: ob-shell-test.org: Remove ob-shell-test.org, ELPA Syncer, 2023/01/11
- [elpa] externals/org 2a0f5a5153 4/8: Refactor ob-shell/bash-uses-assoc-arrays, ELPA Syncer, 2023/01/11
- [elpa] externals/org 9ed2821053 7/8: test-ob-shell.el: Organize tests, ELPA Syncer, 2023/01/11
- [elpa] externals/org 728e7fca81 3/8: test-ob-shell.el: Refactor ob-shell/generic-uses-no-assoc-arrays, ELPA Syncer, 2023/01/11
- [elpa] externals/org 3dbc7849a3 5/8: test-ob-shell.el: Refactor test names and kill test buffers, ELPA Syncer, 2023/01/11