Fix duplicate tests

Reported-by: Stig Brautaset <stig@brautaset.org>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00187.html>
This commit is contained in:
Nicolas Goaziou 2017-09-08 13:20:48 +02:00
parent a307011136
commit 7ce9a24115
3 changed files with 22 additions and 61 deletions

View File

@ -162,7 +162,7 @@
(ert-deftest ob-lilypond/ly-gen-html () (ert-deftest ob-lilypond/ly-gen-html ()
(should (boundp 'org-babel-lilypond-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))) (should (boundp 'org-babel-lilypond-gen-pdf)))
(ert-deftest ob-lilypond/use-eps () (ert-deftest ob-lilypond/use-eps ()

View File

@ -62,29 +62,30 @@ ob-comint.el, which was not previously tested."
(ert-deftest ob-shell/generic-uses-no-assoc-arrays () (ert-deftest ob-shell/generic-uses-no-assoc-arrays ()
"No associative arrays for generic" "No associative arrays for generic"
(should
(equal "first one second two third three"
(org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d" (org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d"
(org-babel-next-src-block) (org-babel-next-src-block)
(should (equal "first one second two third three" (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))))) (org-babel-execute-src-block)))))
(ert-deftest ob-shell/bash-uses-assoc-arrays () (ert-deftest ob-shell/bash-uses-assoc-arrays ()
"Bash associative arrays" "Bash associative arrays"
(should
(equal "two"
(org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d" (org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d"
(org-babel-next-src-block 2) (org-babel-next-src-block 2)
(should (equal "two" (org-babel-execute-src-block))))) (org-babel-execute-src-block))))
;; Bash associative arrays as strings for the row.
(ert-deftest ob-shell/generic-uses-no-assoc-arrays () (should
"No associative arrays for generic" (equal "20 cm"
(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-test-at-id "82320a48-3409-49d7-85c9-5de1c6d3ff87"
(org-babel-next-src-block 2) (org-babel-next-src-block 2)
(should (equal "20 cm" (org-babel-execute-src-block))))) (org-babel-execute-src-block)))))
(ert-deftest ob-shell/simple-list () (ert-deftest ob-shell/simple-list ()
"Test list variables in shell." "Test list variables in shell."

View File

@ -923,21 +923,6 @@ replacement happens correctly."
* next heading"))) * next heading")))
'("sh" "emacs-lisp"))) '("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 () (ert-deftest test-ob/org-babel-results-indented-wrap ()
"Ensure that wrapped results are inserted correction when indented. "Ensure that wrapped results are inserted correction when indented.
If not inserted correctly then the second evaluation will fail 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][bar]]" nil t))
(should (search-forward "[[file:foo][foo]]" 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 () (ert-deftest test-ob/inline-src_blk-preceded-punct-preceded-by-point ()
(let ((test-line ".src_emacs-lisp[ :results verbatim ]{ \"x\" }") (let ((test-line ".src_emacs-lisp[ :results verbatim ]{ \"x\" }")
(org-babel-inline-result-wrap "=%s=")) (org-babel-inline-result-wrap "=%s="))
@ -1034,19 +1007,6 @@ replacement happens correctly."
(buffer-substring-no-properties (buffer-substring-no-properties
(point-min) (point-max)))))) (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 () (ert-deftest test-ob/org-babel-remove-result--results-list ()
"Test `org-babel-remove-result' with :results list." "Test `org-babel-remove-result' with :results list."
(test-ob-verify-result-and-removed-result (test-ob-verify-result-and-removed-result