From 7ce9a24115d8cf716481adb72d5d1783e0fd047b Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 8 Sep 2017 13:20:48 +0200 Subject: [PATCH] Fix duplicate tests Reported-by: Stig Brautaset --- testing/lisp/test-ob-lilypond.el | 2 +- testing/lisp/test-ob-shell.el | 41 ++++++++++++++++---------------- testing/lisp/test-ob.el | 40 ------------------------------- 3 files changed, 22 insertions(+), 61 deletions(-) diff --git a/testing/lisp/test-ob-lilypond.el b/testing/lisp/test-ob-lilypond.el index b59b2c4ad..400d4c88c 100644 --- a/testing/lisp/test-ob-lilypond.el +++ b/testing/lisp/test-ob-lilypond.el @@ -162,7 +162,7 @@ (ert-deftest ob-lilypond/ly-gen-html () (should (boundp 'org-babel-lilypond-gen-html))) -(ert-deftest ob-lilypond/ly-gen-html () +(ert-deftest ob-lilypond/ly-gen-pdf () (should (boundp 'org-babel-lilypond-gen-pdf))) (ert-deftest ob-lilypond/use-eps () diff --git a/testing/lisp/test-ob-shell.el b/testing/lisp/test-ob-shell.el index 61de9ac81..f16a56587 100644 --- a/testing/lisp/test-ob-shell.el +++ b/testing/lisp/test-ob-shell.el @@ -62,29 +62,30 @@ ob-comint.el, which was not previously tested." (ert-deftest ob-shell/generic-uses-no-assoc-arrays () "No associative arrays for generic" - (org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d" - (org-babel-next-src-block) - (should (equal "first one second two third three" - (org-babel-execute-src-block))))) + (should + (equal "first one second two third three" + (org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d" + (org-babel-next-src-block) + (org-babel-execute-src-block)))) + (should + (equal "bread 2 kg spaghetti 20 cm milk 50 dl" + (org-test-at-id "82320a48-3409-49d7-85c9-5de1c6d3ff87" + (org-babel-next-src-block) + (org-babel-execute-src-block))))) (ert-deftest ob-shell/bash-uses-assoc-arrays () "Bash associative arrays" - (org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d" - (org-babel-next-src-block 2) - (should (equal "two" (org-babel-execute-src-block))))) - -(ert-deftest ob-shell/generic-uses-no-assoc-arrays () - "No associative arrays for generic" - (org-test-at-id "82320a48-3409-49d7-85c9-5de1c6d3ff87" - (org-babel-next-src-block) - (should (equal "bread 2 kg spaghetti 20 cm milk 50 dl" - (org-babel-execute-src-block))))) - -(ert-deftest ob-shell/bash-uses-assoc-arrays () - "Bash associative arrays as strings for the row" - (org-test-at-id "82320a48-3409-49d7-85c9-5de1c6d3ff87" - (org-babel-next-src-block 2) - (should (equal "20 cm" (org-babel-execute-src-block))))) + (should + (equal "two" + (org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d" + (org-babel-next-src-block 2) + (org-babel-execute-src-block)))) + ;; Bash associative arrays as strings for the row. + (should + (equal "20 cm" + (org-test-at-id "82320a48-3409-49d7-85c9-5de1c6d3ff87" + (org-babel-next-src-block 2) + (org-babel-execute-src-block))))) (ert-deftest ob-shell/simple-list () "Test list variables in shell." diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el index 4f0f6be2c..cc73946ee 100644 --- a/testing/lisp/test-ob.el +++ b/testing/lisp/test-ob.el @@ -923,21 +923,6 @@ replacement happens correctly." * next heading"))) '("sh" "emacs-lisp"))) -(ert-deftest test-ob/org-babel-remove-result--results-list () - "Test `org-babel-remove-result' with :results list." - (test-ob-verify-result-and-removed-result - "- 1 -- 2 -- 3 -- (quote (4 5))" - - "* org-babel-remove-result -#+begin_src emacs-lisp :results list -'(1 2 3 '(4 5)) -#+end_src - -* next heading")) - (ert-deftest test-ob/org-babel-results-indented-wrap () "Ensure that wrapped results are inserted correction when indented. If not inserted correctly then the second evaluation will fail @@ -967,18 +952,6 @@ trying to find the :END: marker." (should (search-forward "[[file:foo][bar]]" nil t)) (should (search-forward "[[file:foo][foo]]" nil t)))) -(ert-deftest test-ob/org-babel-remove-result--results-pp () - "Test `org-babel-remove-result' with :results pp." - (test-ob-verify-result-and-removed-result - ": \"I /am/ working!\"" - - "* org-babel-remove-result -#+begin_src emacs-lisp :results pp -\"I /am/ working!\") -#+end_src - -* next heading")) - (ert-deftest test-ob/inline-src_blk-preceded-punct-preceded-by-point () (let ((test-line ".src_emacs-lisp[ :results verbatim ]{ \"x\" }") (org-babel-inline-result-wrap "=%s=")) @@ -1034,19 +1007,6 @@ replacement happens correctly." (buffer-substring-no-properties (point-min) (point-max)))))) -(ert-deftest test-ob/org-babel-remove-result--results-default () - "Test `org-babel-remove-result' with default :results." - (mapcar (lambda (language) - (test-ob-verify-result-and-removed-result - "\n" - (concat - "* org-babel-remove-result -#+begin_src " language " -#+end_src - -* next heading"))) - '("sh" "emacs-lisp"))) - (ert-deftest test-ob/org-babel-remove-result--results-list () "Test `org-babel-remove-result' with :results list." (test-ob-verify-result-and-removed-result