test-ob-shell.el: Organize tests

* testing/lisp/test-ob-shell.el:
  - Give instructions on how to run tests
  - Require `org-test' explicitly
  - Group tests into sections
  - Insert `page-delimiter's between sections
This commit is contained in:
Matt Trzcinski 2022-12-30 13:03:59 -05:00 committed by Matthew Trzcinski
parent ccd5977f62
commit bcca8819c3
1 changed files with 10 additions and 2 deletions

View File

@ -18,17 +18,22 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Comment:
;; See testing/README for how to run tests.
;;; Requirements:
(org-test-for-executable "sh")
(require 'ob-core)
(unless (featurep 'ob-shell)
(signal 'missing-test-dependency "Support for Shell code blocks"))
(org-test-for-executable "sh")
;;; Code:
(ert-deftest test-ob-shell/dont-insert-spaces-on-expanded-bodies ()
"Expanded shell bodies should not start with a blank line unless
@ -277,6 +282,7 @@ echo 3
"- 1\n- 2\n- 3\n"
(buffer-substring-no-properties (point) (point-max))))))
;;; Standard output
(ert-deftest test-ob-shell/standard-output-after-success ()
@ -293,6 +299,7 @@ echo 3
"echo 1; exit 2" nil)))
(kill-buffer "*Org-Babel Error Output*")))
;;; Standard error
(ert-deftest test-ob-shell/error-output-after-success ()
@ -341,6 +348,7 @@ buffer, alongside multiple exit codes."
(buffer-string)))))
(kill-buffer "*Org-Babel Error Output*")))
;;; Exit codes
(ert-deftest test-ob-shell/exit-code ()